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 MemIOCallback buffer overflows #148

Merged
merged 2 commits into from
Nov 4, 2023

Commits on Nov 1, 2023

  1. MemIOCallback: fix buffer overflow when reading too much data

    If the addition of 2 positive values is smaller than one of the values then we
    have an overflowing addition.
    
    In this case that means we are trying to read more data that is actually in
    our buffer. So we can use the same mechanism as reading too much data.
    robUx4 committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    d0a3db3 View commit details
    Browse the repository at this point in the history
  2. MemIOCallback: fix buffer overflow when writing too much data

    If the addition of 2 positive values is smaller than one of the values then we
    have an overflowing addition.
    
    In this case we will not be able to allocate that much, just return a size
    written as 0.
    robUx4 committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    33acca5 View commit details
    Browse the repository at this point in the history