-
Notifications
You must be signed in to change notification settings - Fork 9
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
REPLACEFILE buffer overflow #17
Comments
Good find! I'd be happy to receive a PR if you have it or if you'd like I can fix it with the other bug that was opened. 😸 |
I don't have a PR ready, and my allotted retro time for today is done! It took me longer than I'd like to admit to find this. In a VS debug build the error would appear on cleanup in free()ing code, so I spent a couple of hours understanding the code and tracking back - until I realized it wasn't a free problem at all, and the likeliest place for a buffer overflow was the latest changes. |
Prevent buffer overflow, fixes #17
This is why strdup() is considered harmful!
Would submit a PR but not sure how you want to handle it.
Other code in the project is very conservative with filename/path lengths, eg:
Also worth keeping comments up to date - should be REPLACEFILE:
Cheers,
Nick.
The text was updated successfully, but these errors were encountered: