mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 12:53:33 +00:00
2f22c225b1
The buffer allocated in read_chat() could be 1 element too short, if the chatstr parameter passed in is 1 or 3 charachters long (e.g. "a" or "a b"). The allocation of the pointer array does not account for the terminating NULL pointer in that case. Overlapping source and destination strings are undefined in strcpy(). Instead of moving a string to the left by one character just increment the char pointer before it is assigned to the results array. |
||
---|---|---|
.. | ||
chat.c | ||
extern.h | ||
getty.8 | ||
gettytab.5 | ||
gettytab.h | ||
init.c | ||
main.c | ||
Makefile | ||
Makefile.depend | ||
pathnames.h | ||
subr.c | ||
ttys.5 |