[PATCH] Cygwin: Fix size of a buffer in the ps utility

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Feb 26 20:17:00 GMT 2020

On Feb 26 20:08, Jon Turney wrote:
> Fix the size of a temporary buffer used in the ps utility, reported as a
> new warning by gcc-9.2.0
> ../../../../src/winsup/utils/ps.cc: In function 'const char* ttynam(int)':
> ../../../../src/winsup/utils/ps.cc:101:23: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
> ../../../../src/winsup/utils/ps.cc:101:11: note: 'sprintf' output between 9 and 10 bytes into a destination of size 9
> ---
>  winsup/utils/ps.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This is already fixed in git.


Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20200226/875ecc19/attachment.sig>

More information about the Cygwin-patches mailing list