Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed potentially uninitialized variable #41

Merged
merged 1 commit into from
Jul 10, 2024

Commits on Jul 5, 2024

  1. Fixed potentially uninitialized variable

    In the case where the file has reached the end, readBin doesn't initialize the "bytes" variable. It therefore contains garbage values, which has a small chance of making the switch select another case than "default", leading to an infinite loop. This isn't just speculation, this has actually happened to me while compiling in Unreal 5.3.
    It is worth mentionning that the idiomatic way of checking whether or not the file has reached the end is to use file.eof() instead of relying on the fact that the variable isn't touched by "read".
    antoine21839 authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    6c7335f View commit details
    Browse the repository at this point in the history