mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
71bc4af6ed
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. MFC after: 2 weeks |
||
---|---|---|
.. | ||
chat.c | ||
extern.h | ||
getty.8 | ||
gettytab | ||
gettytab.5 | ||
gettytab.h | ||
init.c | ||
main.c | ||
Makefile | ||
Makefile.depend | ||
pathnames.h | ||
subr.c | ||
ttys.5 |