PR middle-end/77608 - missing protection on trivially detectable runtime buffer overflow
authorMartin Sebor <msebor@gcc.gnu.org>
Tue, 19 Dec 2017 19:14:57 +0000 (12:14 -0700)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 19 Dec 2017 19:14:57 +0000 (12:14 -0700)
commitaf3fa359b4b7335008652b9f1eefbd41ac8216d9
tree0b623ef61a38f20695163685271de8c2c80a50f7
parentad2a970f7973708ea3359c0b8cc2aec7c9ead1bb
PR middle-end/77608 - missing protection on trivially detectable runtime buffer overflow

gcc/ChangeLog:

PR middle-end/77608
* builtins.c (compute_objsize): Handle non-constant offsets.

gcc/testsuite/ChangeLog:

PR middle-end/77608
* gcc.dg/Wstringop-overflow.c: New test.
* gcc/testsuite/c-c++-common/Warray-bounds-3.c: Adjust.

From-SVN: r255836
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Warray-bounds-3.c
gcc/testsuite/gcc.dg/Wstringop-overflow.c [new file with mode: 0644]