mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00:00
2001-04-16 Daniel Berlin <dan@cgsoftware.com>
* demangle.c (_initialize_demangler): Use xcalloc on the demangling_style_names, and make it a null terminated array of names, to avoid a crash.
This commit is contained in:
@@ -186,7 +186,7 @@ _initialize_demangler (void)
|
||||
libiberty_demanglers[ndems].demangling_style != unknown_demangling;
|
||||
ndems++)
|
||||
;
|
||||
demangling_style_names = xmalloc (ndems * sizeof (char *));
|
||||
demangling_style_names = xcalloc (ndems + 1, sizeof (char *));
|
||||
for (i = 0;
|
||||
libiberty_demanglers[i].demangling_style != unknown_demangling;
|
||||
i++)
|
||||
|
||||
Reference in New Issue
Block a user