On 08/13/2018 03:29 PM, Martin Sebor wrote: > The attached changes implement the detection of past-the-end reads > by strncpy due to unterminated arguments and excessive bounds. > > > gcc-86552-6.diff > > > PR tree-optimization/86552 - missing warning for reading past the end of > non-string arrays > > gcc/ChangeLog: > * builtins.c (expand_builtin_strnlen): Detect, avoid expanding, > and diagnose unterminated arrays. > > gcc/testsuite/ChangeLog: > * gcc.dg/warn-strnlen-no-nul.c: New. This will have the same state and resolution as #2-#5.
jeff