From a5a8b52afda62835e7d072671c9382298653001f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 10 Aug 2004 13:34:41 +0000 Subject: [PATCH] (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. --- src/lib/player/empdis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/player/empdis.c b/src/lib/player/empdis.c index 5c63ca32..7d9c6645 100644 --- a/src/lib/player/empdis.c +++ b/src/lib/player/empdis.c @@ -177,7 +177,7 @@ gamedown(void) if (tgm.tel_length >= (long)sizeof(buf)) tgm.tel_length = sizeof(buf) - 1; buf[tgm.tel_length] = 0; - pr(buf); + prnf(buf); pr("\nThe game is down\n"); (void)close(downf); return 1;