Skip to content
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 for BIO_gets and update documentation #1756

Merged
merged 3 commits into from
Aug 9, 2024
Merged

Conversation

smittals2
Copy link
Contributor

@smittals2 smittals2 commented Aug 9, 2024

Description of changes:

BIO_gets takes a len/size parameter which is of type int and can be negative. Previously, this param was passed into callback_ex without a check for len being positive. This is an issue since callback_ex defines this size/len param as a size_t var. Passing in a negative number to size_t could lead to unexpected behavior.
A similar issue exists in BIO_read and BIO_write

This PR moves the check for len to before calling the callback and updates documentation for BIO_gets, BIO_read, and BIO_write.

@smittals2 smittals2 requested a review from a team as a code owner August 9, 2024 20:19
skmcgrail
skmcgrail previously approved these changes Aug 9, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.42%. Comparing base (697b277) to head (1ec6c34).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1756      +/-   ##
==========================================
- Coverage   78.44%   78.42%   -0.03%     
==========================================
  Files         580      580              
  Lines       96779    96779              
  Branches    13863    13863              
==========================================
- Hits        75920    75900      -20     
- Misses      20241    20260      +19     
- Partials      618      619       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

andrewhop
andrewhop previously approved these changes Aug 9, 2024
darylmartin100
darylmartin100 previously approved these changes Aug 9, 2024
@smittals2 smittals2 merged commit 94f021b into aws:main Aug 9, 2024
106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants