newlib/winsup/utils
Corinna Vinschen 09981903e6 Cygwin: ps: fix compiler warning in ttynam
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>
2020-02-26 21:08:51 +01:00
..
aclocal.m4
autogen.sh
bloda.cc
chattr.c
configure
configure.ac
COPYING.dumper
cygcheck.cc cygcheck: expand common_apps list 2019-06-04 11:31:54 -04:00
cygpath.cc
cygwin-console-helper.cc Cygwin: pty: Prevent the helper process from exiting by Ctrl-C. 2019-09-14 09:17:27 -04:00
dump_setup.cc
dumper.cc Cygwin: suppress GCC 8.3 errors with -Warray-bounds 2019-07-16 13:19:33 -04:00
dumper.h
gencat.c
getconf.c
getfacl.c
kill.cc Cygwin: utils: kill: revert erroneously removed optind correction 2019-02-18 10:22:37 +01:00
ldd.cc Cygwin: ldd: Try harder to get dll names 2019-08-15 09:56:11 +02:00
ldh.cc
loadlib.h
locale.cc
lsattr.c
Makefile.in Cygwin: ldd: Try harder to get dll names 2019-08-15 09:56:11 +02:00
minidumper.cc
mkgroup.c
mkpasswd.c
module_info.cc
mount.cc Cygwin: utils: MOUNT_BINARY -> MOUNT_TEXT 2019-02-18 11:02:03 +01:00
parse_pe.cc
passwd.c
path.cc Cygwin: utils: MOUNT_BINARY -> MOUNT_TEXT 2019-02-18 11:02:03 +01:00
path.h
pldd.c
ps.cc Cygwin: ps: fix compiler warning in ttynam 2020-02-26 21:08:51 +01:00
regtool.cc regtool: allow /proc/registry{,32,64}/ registry path prefix 2019-11-13 09:39:04 +01:00
setfacl.c
setmetamode.c
ssp.c
ssp.txt
strace.cc Cygwin: strace: print windows and cygwin pid in event output 2019-03-23 17:50:00 +01:00
testsuite.cc
testsuite.h
tzmap-from-unicode.org
tzmap.h
tzset.c
umount.cc
wide_path.h