(gamedown): Printed down message with pr(), as a printf()-like format
string! This reads and formats junk from the stack when message contains '%', and can even crash. Use prnf() instead. Catched by Ron Koenderink.
This commit is contained in:
parent
298ba998e4
commit
a5a8b52afd
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ gamedown(void)
|
||||||
if (tgm.tel_length >= (long)sizeof(buf))
|
if (tgm.tel_length >= (long)sizeof(buf))
|
||||||
tgm.tel_length = sizeof(buf) - 1;
|
tgm.tel_length = sizeof(buf) - 1;
|
||||||
buf[tgm.tel_length] = 0;
|
buf[tgm.tel_length] = 0;
|
||||||
pr(buf);
|
prnf(buf);
|
||||||
pr("\nThe game is down\n");
|
pr("\nThe game is down\n");
|
||||||
(void)close(downf);
|
(void)close(downf);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue