mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-20 14:22:35 +08:00
PR26478 UBSAN: mmo.c:2941 null pointer memcpy
PR 26478 * mmo.c (mmo_write_symbols_and_terminator): Don't memcpy empty table.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-08-26 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 26478
|
||||||
|
* mmo.c (mmo_write_symbols_and_terminator): Don't memcpy empty table.
|
||||||
|
|
||||||
2020-08-26 Alan Modra <amodra@gmail.com>
|
2020-08-26 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 26475
|
PR 26475
|
||||||
|
@ -2938,6 +2938,7 @@ mmo_write_symbols_and_terminator (bfd *abfd)
|
|||||||
if (table == NULL)
|
if (table == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (count != 0)
|
||||||
memcpy (table, orig_table, count * sizeof (asymbol *));
|
memcpy (table, orig_table, count * sizeof (asymbol *));
|
||||||
|
|
||||||
/* Move :Main (if there is one) to the first position. This is
|
/* Move :Main (if there is one) to the first position. This is
|
||||||
|
Reference in New Issue
Block a user