Skip to content

Commit 3c8f47b

Browse files
mdkinneymergify[bot]
authored andcommitted
EmulatorPkg/Win/Host: Use safe function _vsnprintf_s()
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]>
1 parent 4218026 commit 3c8f47b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EmulatorPkg/Win/Host/WinHost.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ SecPrint (
190190

191191
va_start (Marker, Format);
192192

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

195195
va_end (Marker);
196196

0 commit comments

Comments
 (0)