cp-demangle.c (d_expression_1): Don't peek ahead unless the current char is valid.
* cp-demangle.c (d_expression_1): Don't peek ahead unless the current char is valid. * testsuite/demangle-expected: Add testcase. From-SVN: r270664
This commit is contained in:
parent
7fb1d0214e
commit
956bea2cd6
|
@ -1,3 +1,9 @@
|
||||||
|
2019-04-29 Ben L <bobsayshilol@live.co.uk>
|
||||||
|
|
||||||
|
* cp-demangle.c (d_expression_1): Don't peek ahead unless the current
|
||||||
|
char is valid.
|
||||||
|
* testsuite/demangle-expected: Add testcase.
|
||||||
|
|
||||||
2019-04-10 Nick Clifton <nickc@redhat.com>
|
2019-04-10 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR 89394
|
PR 89394
|
||||||
|
|
|
@ -3359,7 +3359,7 @@ d_expression_1 (struct d_info *di)
|
||||||
d_advance (di, 2);
|
d_advance (di, 2);
|
||||||
if (peek == 't')
|
if (peek == 't')
|
||||||
type = cplus_demangle_type (di);
|
type = cplus_demangle_type (di);
|
||||||
if (!d_peek_next_char (di))
|
if (!d_peek_char (di) || !d_peek_next_char (di))
|
||||||
return NULL;
|
return NULL;
|
||||||
return d_make_comp (di, DEMANGLE_COMPONENT_INITIALIZER_LIST,
|
return d_make_comp (di, DEMANGLE_COMPONENT_INITIALIZER_LIST,
|
||||||
type, d_exprlist (di, 'E'));
|
type, d_exprlist (di, 'E'));
|
||||||
|
|
|
@ -68,6 +68,10 @@ _$_H1R
|
||||||
|
|
||||||
_Q8ccQ4M2e.
|
_Q8ccQ4M2e.
|
||||||
_Q8ccQ4M2e.
|
_Q8ccQ4M2e.
|
||||||
|
# Could crash
|
||||||
|
|
||||||
|
_ZmmAtl
|
||||||
|
_ZmmAtl
|
||||||
#
|
#
|
||||||
# demangler/80513 Test for bogus characters after __thunk_
|
# demangler/80513 Test for bogus characters after __thunk_
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue