forked from Imagelibrary/binutils-gdb
* Makefile.in (VERSION): Bump to 4.5.7.
* cplus-dem.c (demangle_args): Validate index for previously seen type to guard against bogus values from malformed manglings. * valops.c (value_struct_elt_for_reference): Guard against blindly using NULL return value from lookup_symbol.
This commit is contained in:
@@ -1578,7 +1578,9 @@ demangle_args (declp, type, work)
|
||||
#ifdef ARM_DEMANGLING
|
||||
t--;
|
||||
#endif
|
||||
if (t >= work -> ntypes)
|
||||
/* Validate the type index. Protect against illegal indices from
|
||||
malformed type strings. */
|
||||
if ((t < 0) || (t >= work -> ntypes))
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user