[Bug middle-end/77608] missing protection on trivially detectable runtime buffer overflow

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 19 19:15:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77608

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Tue Dec 19 19:14:57 2017
New Revision: 255836

URL: https://gcc.gnu.org/viewcvs?rev=255836&root=gcc&view=rev
Log:
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.


Added:
    trunk/gcc/testsuite/gcc.dg/Wstringop-overflow.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/c-c++-common/Warray-bounds-3.c


More information about the Gcc-bugs mailing list