Re: [PATCH] correct length stpncpy handling in -Wformat-overflow (PR 80669)

2017-05-12 Thread Jeff Law
On 05/08/2017 11:37 AM, Martin Sebor wrote: The -Wformat-overflow warning newly enhanced in GCC 8.0 to detect reading past the end of the source sequence misinterprets the size argument to stpncpy as a request to read that many bytes from the source sequence, rather than the number of bytes to wr

[PATCH] correct length stpncpy handling in -Wformat-overflow (PR 80669)

2017-05-08 Thread Martin Sebor
The -Wformat-overflow warning newly enhanced in GCC 8.0 to detect reading past the end of the source sequence misinterprets the size argument to stpncpy as a request to read that many bytes from the source sequence, rather than the number of bytes to write. Like strncpy, the function never reads