* demangle.c (_initialize_demangler): Use xcalloc on the
demangling_style_names, and make it a null terminated array of
names, to avoid a crash.
+
+ * demangle.c (_initialize_demangler): Use xcalloc on the
+ demangling_style_names, and make it a null terminated array of
+ names, to avoid a crash.
+
* i386-tdep.c (i386_frame_chain): New function.
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++)