From f465b1e1e2a846f36facfe484ce7f484c89aa960 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 7 Feb 2009 19:49:21 +0100 Subject: [PATCH] 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. --- src/lib/commands/turn.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.43.0