We check whether the elements are set before printing their contents,
but didn't make sure they were initialized.
Reported-by: Hanno Böck <hanno@hboeck.de>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2014-11-08 Mark Wielaard <mjw@redhat.com>
+
+ * readelf.c (handle_versym): Initialize vername and filename array
+ elements.
+
2014-11-07 Mark Wielaard <mjw@redhat.com>
* readelf.c (handle_sysv_hash): Sanity check section contents.
/* Allocate the array. */
vername = (const char **) alloca (nvername * sizeof (const char *));
+ memset(vername, 0, nvername * sizeof (const char *));
filename = (const char **) alloca (nvername * sizeof (const char *));
+ memset(filename, 0, nvername * sizeof (const char *));
/* Run through the data structures again and collect the strings. */
if (defscn != NULL)