r242451 - in /trunk/libiberty: ChangeLog cp-dem...

mark@gcc.gnu.org mark@gcc.gnu.org
Tue Nov 15 19:32:00 GMT 2016


Author: mark
Date: Tue Nov 15 19:31:59 2016
New Revision: 242451

URL: https://gcc.gnu.org/viewcvs?rev=242451&root=gcc&view=rev
Log:
libiberty: demangler crash with missing :? or fold expression component.

When constructing an :? or fold expression that requires a third
expression only the first and second were explicitly checked to
not be NULL. Since the third expression is also required in these
constructs it needs to be explicitly checked and rejected when missing.
Otherwise the demangler will crash once it tries to d_print the
NULL component. Added two examples to demangle-expected of strings
that would crash before this fix.

Found by American Fuzzy Lop (afl) fuzzer.

Modified:
    trunk/libiberty/ChangeLog
    trunk/libiberty/cp-demangle.c
    trunk/libiberty/testsuite/demangle-expected



More information about the Gcc-cvs mailing list