From: Mark Wielaard Date: Tue, 14 Jan 2014 21:13:43 +0000 (+0100) Subject: readelf: print_debug_macro_section clear vendor array before use. X-Git-Tag: elfutils-0.159~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04781c3e80412c7051b12dbdc58a642ab258cef0;p=thirdparty%2Felfutils.git readelf: print_debug_macro_section clear vendor array before use. Not setting a vendor code before use would be invalid which we tried to catch. But to detect that we do need to initialize the vendor array to zero first. Signed-off-by: Mark Wielaard --- diff --git a/src/ChangeLog b/src/ChangeLog index 50b6b5884..d085d754c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-01-14 Mark Wielaard + + * readelf.c (print_debug_macro_section): Clear vendor array before + use. + 2014-01-15 Jan Kratochvil Fix corruption of non-C++ symbols by the demangler. diff --git a/src/readelf.c b/src/readelf.c index 739156cf8..39912243b 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -6896,6 +6896,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), } const unsigned char *vendor[DW_MACRO_GNU_hi_user - DW_MACRO_GNU_lo_user]; + memset (vendor, 0, sizeof vendor); if (flag & 0x04) { // 1 byte length, for each item, 1 byte opcode, uleb128 number