mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
asan: readelf: stack buffer overflow
* readelf.c (print_dynamic_symbol): Don't sprintf to buffer to find string length.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-07-06 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* readelf.c (print_dynamic_symbol): Don't sprintf to buffer to
|
||||||
|
find string length.
|
||||||
|
|
||||||
2020-07-04 Nick Clifton <nickc@redhat.com>
|
2020-07-04 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
@ -12091,9 +12091,9 @@ print_dynamic_symbol (Filedata *filedata, unsigned long si,
|
|||||||
int len_avail = 21;
|
int len_avail = 21;
|
||||||
if (! do_wide && version_string != NULL)
|
if (! do_wide && version_string != NULL)
|
||||||
{
|
{
|
||||||
char buffer[256];
|
char buffer[16];
|
||||||
|
|
||||||
len_avail -= sprintf (buffer, "@%s", version_string);
|
len_avail -= 1 + strlen (version_string);
|
||||||
|
|
||||||
if (sym_info == symbol_undefined)
|
if (sym_info == symbol_undefined)
|
||||||
len_avail -= sprintf (buffer," (%d)", vna_other);
|
len_avail -= sprintf (buffer," (%d)", vna_other);
|
||||||
|
Reference in New Issue
Block a user