diff options
author | David Malcolm <dmalcolm@redhat.com> | 2016-05-19 18:10:30 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2016-05-19 18:10:30 +0000 |
commit | 5e9a538594761b93843b4285c06bcd871fa0335f (patch) | |
tree | 400ffed166e4c228ca8195177c6d22df759aff75 /libcpp/errors.c | |
parent | 1478c897bff210b8ea875f5aa58da68ee6264c45 (diff) | |
download | gcc-5e9a538594761b93843b4285c06bcd871fa0335f.zip gcc-5e9a538594761b93843b4285c06bcd871fa0335f.tar.gz gcc-5e9a538594761b93843b4285c06bcd871fa0335f.tar.bz2 |
PR c++/71184: Fix NULL dereference in cp_parser_operator
The source-range handling for the array form of operator
new/delete erroneously assumed that the "]" was present,
leading to a dereference of NULL when it's absent.
Fix it thusly.
gcc/cp/ChangeLog:
PR c++/71184
* parser.c (cp_parser_operator): For array new/delete, check that
cp_parser_require returned a non-NULL token before dereferencing
it.
gcc/testsuite/ChangeLog:
PR c++/71184
* g++.dg/pr71184.C: New test case.
From-SVN: r236483
Diffstat (limited to 'libcpp/errors.c')
0 files changed, 0 insertions, 0 deletions