mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-24 21:38:39 -04:00
Fix a format string vulnerability
This commit is contained in:
parent
70a0d74de2
commit
c86a999f74
@ -1276,7 +1276,7 @@ static void G_DoSaveGame(void)
|
||||
Z_CheckHeap();
|
||||
|
||||
if (!M_WriteFile(name, savebuffer, length))
|
||||
dprintf(errno ? strerror(errno) : "Could not save game: Error unknown");
|
||||
dprintf("%s", errno ? strerror(errno) : "Could not save game: Error unknown");
|
||||
else
|
||||
players[consoleplayer].message = s_GGSAVED; // Ty 03/27/98 - externalized
|
||||
|
||||
|
@ -2399,7 +2399,7 @@ void M_ScreenShot (void)
|
||||
// players[consoleplayer].message = "screen shot"
|
||||
|
||||
// killough 10/98: print error message and change sound effect if error
|
||||
S_StartSound(NULL, !success ? dprintf(errno ? strerror(errno) :
|
||||
S_StartSound(NULL, !success ? dprintf("%s", errno ? strerror(errno) :
|
||||
"Could not take screenshot"), sfx_oof :
|
||||
gamemode==commercial ? sfx_radio : sfx_tink);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user