diff options
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 825000e5ff9..fa7d2b52838 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -14177,6 +14177,7 @@ load_specific_debug_section (enum dwarf_section_display_enum debug, } #if HAVE_LIBDEBUGINFOD +/* Return a hex string representation of the build-id. */ unsigned char * get_build_id (void * data) { @@ -14297,6 +14298,7 @@ get_build_id (void * data) for (j = 0; j < inote.descsz; ++j) sprintf(build_id + (j * 2), "%02x", inote.descdata[j] & 0xff); + build_id[inote.descsz * 2] = '\0'; return (unsigned char *)build_id; } |