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 syscall_read to handle partial reads and errors #257

Merged
merged 1 commit into from
Nov 6, 2023

Commits on Nov 5, 2023

  1. Fix syscall_read to handle partial reads and errors

    In the original syscall_read function, an assertion error could occur
    when the number of bytes read didn't match the number of bytes
    requested. This was because the function didn't handle partial reads
    and errors properly.
    
    The modified syscall_read function now handles partial reads by
    breaking the loop when a read operation doesn't fill the entire buffer.
    Additionally, it checks for errors during the read operation and sets
    the return value to -1 if an error occurs.
    visitorckw committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    c1b8db0 View commit details
    Browse the repository at this point in the history