-
Notifications
You must be signed in to change notification settings - Fork 59
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
Attempt to fix memory issues with Exhumed sound loading #642
Conversation
Properly get the length of the sound file name to prevent a buffer overflow. Also, use proper UTF-8 character for the degree symbol.
Should we just use strlen unconditionally? |
You cannot use strlen on a buffer that may not have a 0 terminator. If you are unlucky it'd crash with an access violation. |
This is the issue I tried to fix:
|
A for loop has a maximum whereas strlen does not
How about |
In that case this is the wrong place to do the fix. Just looking at the calling code gives me headaches. The term wrong doesn't even begin to describe the shit going on there. |
Cam you please retry with the latest build? I changed the loading code so that it doesn't pass uninitialized data to other functions. |
Properly get the length of the sound file name to prevent a buffer overflow.
Also, use proper UTF-8 character for the degree symbol.