mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
ubsan: som_is_space null dereference
On objcopy of fuzzed file. * som.c (som_write_fixups): Exit loop if space sections all processed.
This commit is contained in:
@ -2933,8 +2933,10 @@ som_write_fixups (bfd *abfd,
|
|||||||
asection *subsection;
|
asection *subsection;
|
||||||
|
|
||||||
/* Find a space. */
|
/* Find a space. */
|
||||||
while (!som_is_space (section))
|
while (section && !som_is_space (section))
|
||||||
section = section->next;
|
section = section->next;
|
||||||
|
if (!section)
|
||||||
|
break;
|
||||||
|
|
||||||
/* Now iterate through each of its subspaces. */
|
/* Now iterate through each of its subspaces. */
|
||||||
for (subsection = abfd->sections;
|
for (subsection = abfd->sections;
|
||||||
|
Reference in New Issue
Block a user