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:
Alan Modra 2022-09-12 18:58:53 +09:30
parent 3cb5e955a3
commit 72e366db62

View file

@ -2933,8 +2933,10 @@ som_write_fixups (bfd *abfd,
asection *subsection;
/* Find a space. */
while (!som_is_space (section))
while (section && !som_is_space (section))
section = section->next;
if (!section)
break;
/* Now iterate through each of its subspaces. */
for (subsection = abfd->sections;