From: Paul Pluzhnikov Date: Thu, 8 Mar 2018 02:16:34 +0000 (-0800) Subject: Fix PR binutils/22923. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d4f21f6eee9933a2883f2a214953432c13ee1c2;p=binutils-gdb.git Fix PR binutils/22923. A static buffer in get_ver_flags may overflow when e.g. German translation is longer than English original. Avoid that by expanding the buffer. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3f3a9ddb567..52fe2d37416 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2018-03-07 Paul Pluzhnikov + + PR binutils/22923 + * binutils/readelf.c (get_ver_flags): Expand buffer to avoid + overflow. + 2018-03-07 Alan Modra * configure.ac: Add objdump_private_desc_xcoff for rs6000. diff --git a/binutils/readelf.c b/binutils/readelf.c index e3af50a9c94..b85db9f97ce 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -10212,7 +10212,7 @@ process_dynamic_section (Filedata * filedata) static char * get_ver_flags (unsigned int flags) { - static char buff[32]; + static char buff[128]; buff[0] = 0;