(show_motd): Printed motd with pr(), as a printf()-like format string!
This reads and formats junk from the stack when motd contains '%', and can even crash. Use prnf() instead.
This commit is contained in:
parent
743be658c8
commit
d721ba3b5c
1 changed files with 1 additions and 1 deletions
|
@ -366,7 +366,7 @@ show_motd(void)
|
|||
if (tgm.tel_length >= (long)sizeof(buf))
|
||||
tgm.tel_length = sizeof(buf) - 1;
|
||||
buf[tgm.tel_length] = 0;
|
||||
pr(buf);
|
||||
prnf(buf);
|
||||
(void)close(upf);
|
||||
return RET_OK;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue