1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-22 11:17:19 +00:00
freebsd/libexec/getty
Stefan Eßer 71bc4af6ed Fix potential buffer overflow and undefined behavior.
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
2019-01-26 20:43:28 +00:00
..
chat.c Fix potential buffer overflow and undefined behavior. 2019-01-26 20:43:28 +00:00
extern.h
getty.8
gettytab Move gettytab to libexec/getty/ 2018-09-05 15:25:23 +00:00
gettytab.5
gettytab.h
init.c
main.c
Makefile Move gettytab to libexec/getty/ 2018-09-05 15:25:23 +00:00
Makefile.depend
pathnames.h
subr.c
ttys.5