-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory corruption caused by swprintf
swprintf requires a destination buffer size like snprintf. This was previously only working by chance because of how MSVC emits variadic functions. swprintf also automatically appends a null terminator to the output string so there's no reason to add it via the format string. This was leading to a buffer overflow and occasional heap corruption.
- Loading branch information
Hunter Kvalevog
committed
May 16, 2024
1 parent
1c176f6
commit 6cb1f88
Showing
1 changed file
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters