1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +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 .Xr pstat(8), so that people have a chance to learn how to get a list 2018-03-02 14:16:19 +00:00
gettytab Move gettytab to libexec/getty/ 2018-09-05 15:25:23 +00:00
gettytab.5 Fix gettytab(5) to document f0, f1, and f2 as unsupported; they've been gone 2018-02-26 17:51:18 +00:00
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 Remove pointless comment. 2018-08-03 10:59:05 +00:00