Use the empty string for note names with zero size (without any data).
authorMark Wielaard <mark@klomp.org>
Fri, 24 Mar 2017 13:10:26 +0000 (14:10 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 3 Apr 2017 21:47:59 +0000 (23:47 +0200)
commitb0b58c5e0b34e54194aa042f2310af58ee7de603
tree833f7fb0c98218a3af8450f8d5171e320b4f20d3
parent9d84fdd78705d7a1b9947a9f4ca77fbccdd76d4a
Use the empty string for note names with zero size (without any data).

ELF notes can have a zero sized name. In which case there is no data at
all (so also no zero terminator). Make sure to use the empty string for
such notes if the code does not otherwise explicitly check n_namesz.

https://sourceware.org/bugzilla/show_bug.cgi?id=21300

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdwfl/ChangeLog
libdwfl/linux-core-attach.c
src/ChangeLog
src/elfcmp.c
src/readelf.c