-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bad iovec length check #972
Conversation
@@ -229,9 +229,8 @@ static __always_inline int read_msghdr_buf(struct msghdr *msg, u8* buf, int max_ | |||
continue; | |||
} | |||
|
|||
u32 l = vec.iov_len; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This local was overwriting the real 'l' which we check for on line 238.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #972 +/- ##
==========================================
- Coverage 80.56% 80.51% -0.06%
==========================================
Files 134 134
Lines 10591 10591
==========================================
- Hits 8533 8527 -6
- Misses 1557 1560 +3
- Partials 501 504 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
In my last PR I noticed an error for which I can't seem to write a test. The length I was checking was overwritten and it works for our cases, but it should've been the max_length clamped to the IO_VEC_MAX_LEN.