From: Markus Armbruster Date: Sat, 7 Feb 2009 18:49:21 +0000 (+0100) Subject: Don't write junk to unused bytes of downfil and motdfil X-Git-Tag: v4.3.20~41 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=f465b1e1e2a846f36facfe484ce7f484c89aa960 Don't write junk to unused bytes of downfil and motdfil These files don't use all members of struct telstr. turn() neglected to initialized the unused ones and struct telstr's holes. Fix that. --- diff --git a/src/lib/commands/turn.c b/src/lib/commands/turn.c index 64a32298f..eef95bbad 100644 --- a/src/lib/commands/turn.c +++ b/src/lib/commands/turn.c @@ -107,6 +107,7 @@ turn(void) if (msgfilepath == downfil) pr("Logins disabled.\n"); + memset(&tgm, 0, sizeof(tgm)); if ((fwrite(&tgm, sizeof(tgm), 1, fptr) != 1) || (fwrite(msgbuf, tgm.tel_length, 1, fptr) != 1)) { fclose(fptr);