Skip to content

Commit

Permalink
EmulatorPkg/Win/Host: Use safe function _vsnprintf_s()
Browse files Browse the repository at this point in the history
Update SecPrint() to use _vsnprintf_s() instead of
_vsnprintf() that is a safe function and allows the
defines _CRT_SECURE_NO_WARNINGS and _CRT_SECURE_NO_DEPRECATE
to be removed from WinHost builds.

Signed-off-by: Michael D Kinney <[email protected]>
  • Loading branch information
mdkinney authored and mergify[bot] committed Jan 13, 2025
1 parent 4218026 commit 3c8f47b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EmulatorPkg/Win/Host/WinHost.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ SecPrint (

va_start (Marker, Format);

_vsnprintf (Buffer, sizeof (Buffer), Format, Marker);
_vsnprintf_s (Buffer, sizeof (Buffer), sizeof (Buffer) - 1, Format, Marker);

va_end (Marker);

Expand Down

0 comments on commit 3c8f47b

Please sign in to comment.