PR middle-end/77608 - missing protection on trivially detectable runtime buffer overflow
commit24e3b8216bf03f81dffa9a6d175077db89acd608
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Dec 2017 19:14:57 +0000 (19 19:14 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Dec 2017 19:14:57 +0000 (19 19:14 +0000)
tree0b623ef61a38f20695163685271de8c2c80a50f7
parentedcf99db18d63826ce071b68930726dc3107d3c2
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255836 138bc75d-0d04-0410-961f-82ee72b054a4
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]