Skip to content

Fix integer underflow and add additional size check#106

Merged
eduardsui merged 1 commit into
eduardsui:masterfrom
otsmr:fixing_integer_overflow
Nov 27, 2024
Merged

Fix integer underflow and add additional size check#106
eduardsui merged 1 commit into
eduardsui:masterfrom
otsmr:fixing_integer_overflow

Conversation

@otsmr

@otsmr otsmr commented Nov 27, 2024

Copy link
Copy Markdown
Contributor

This fixes #105. The check of the size was the wrong way as size must be greater then remaining otherwise there is an interger underflow of remaining. This adds also an additional check of res2 to ensure that this is never bigger then buf_len.

Please double check if this works, I am currently on vacation and I am not able to compile it to test it!

@eduardsui
eduardsui merged commit 3482b09 into eduardsui:master Nov 27, 2024
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.

Integer Overflow

2 participants