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.
This commit is contained in:
parent
fe9f02ccfb
commit
f465b1e1e2
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue