asan: readelf: stack buffer overflow
* readelf.c (print_dynamic_symbol): Don't sprintf to buffer to find string length.
This commit is contained in:
parent
c56374d118
commit
ddb43bab17
2 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue