09981903e6
The helper function ttynam creates a tty name by using sprintf wrongly on a pretty short buffer. The foramt string only specifies a minimum field length, not a maximum field length, so gcc-9.2.0 complains: ps.cc:101:23: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=] Fix this thoroughly by specifying a maximum field width as well as by using snprintf with a fixed buffer length. Also, drop using a static buffer in favor of using a buffer in the caller. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> |
||
---|---|---|
.. | ||
aclocal.m4 | ||
autogen.sh | ||
bloda.cc | ||
chattr.c | ||
configure | ||
configure.ac | ||
COPYING.dumper | ||
cygcheck.cc | ||
cygpath.cc | ||
cygwin-console-helper.cc | ||
dump_setup.cc | ||
dumper.cc | ||
dumper.h | ||
gencat.c | ||
getconf.c | ||
getfacl.c | ||
kill.cc | ||
ldd.cc | ||
ldh.cc | ||
loadlib.h | ||
locale.cc | ||
lsattr.c | ||
Makefile.in | ||
minidumper.cc | ||
mkgroup.c | ||
mkpasswd.c | ||
module_info.cc | ||
mount.cc | ||
parse_pe.cc | ||
passwd.c | ||
path.cc | ||
path.h | ||
pldd.c | ||
ps.cc | ||
regtool.cc | ||
setfacl.c | ||
setmetamode.c | ||
ssp.c | ||
ssp.txt | ||
strace.cc | ||
testsuite.cc | ||
testsuite.h | ||
tzmap-from-unicode.org | ||
tzmap.h | ||
tzset.c | ||
umount.cc | ||
wide_path.h |