On 08/16/2017 02:55 PM, David Malcolm wrote:
On Wed, 2017-08-16 at 10:12 -0600, Martin Sebor wrote:
PR c/81859 - [8 Regression] valgrind error from
warn_about_normalization
gcc/ChangeLog:
PR c/81859
* pretty-print.c (pp_format): Use strnlen in %.*s to avoid
reading
past
On Wed, 2017-08-16 at 10:12 -0600, Martin Sebor wrote:
> PR c/81859 - [8 Regression] valgrind error from
> warn_about_normalization
>
> gcc/ChangeLog:
>
> PR c/81859
> * pretty-print.c (pp_format): Use strnlen in %.*s to avoid
> reading
> past the end of an array.
> (test_
Bug 81859 points out that my fix for bug 81586 wasn't quite
right (or complete): the argument of a %.*s directive need
not be a nul-terminated string when the precision is less
than the initialized size of the array the argument points
to. The attached tweak uses strnlen to avoid reading past
th