mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
PR26453 UBSAN: som.c:2885 null pointer memcpy
PR 26453 * som.c (som_prep_for_fixups): Return early when no symbols.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2020-08-26 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 26453
|
||||
* som.c (som_prep_for_fixups): Return early when no symbols.
|
||||
|
||||
2020-08-26 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 26418
|
||||
|
@ -2804,6 +2804,9 @@ som_prep_for_fixups (bfd *abfd, asymbol **syms, unsigned long num_syms)
|
||||
asymbol **sorted_syms;
|
||||
size_t amt;
|
||||
|
||||
if (num_syms == 0)
|
||||
return TRUE;
|
||||
|
||||
/* Most SOM relocations involving a symbol have a length which is
|
||||
dependent on the index of the symbol. So symbols which are
|
||||
used often in relocations should have a small index. */
|
||||
|
Reference in New Issue
Block a user