Skip to content

Conversation

En-En-Code
Copy link
Contributor

Found with Valgrind while cleaning up the Linux cheat menu code.

The length calculated for versionSubstring is the number of bytes in the substring, but that did not account for the null terminator necessary when putting the data in its own string allocation. Thus, the sscanf call could read outsize the allocation bound.

The fix is very simple: provide the extra byte necessary to store a null terminator and do so.

@zeromus zeromus merged commit f51e19b into TASEmulators:master Nov 3, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants