Prevent potential buffer s overflow by limiting the characters written.

Use vsnprintf instead of vsprintf.
This commit is contained in:
Holger Vogt 2026-02-24 17:02:00 +01:00
parent c939f9610a
commit cd568e37bc
1 changed files with 1 additions and 1 deletions

View File

@ -1499,7 +1499,7 @@ win_x_fprintf(FILE *stream, const char *format, ...)
if ((stream == stdout) || (stream == stderr)) {
s[0] = SE;
result = vsprintf(s, format, args);
result = vsnprintf(s, IOBufSize, format, args);
win_x_fputs(s, stream);
} else
result = vfprintf(stream, format, args);