diff options
author | Alan Modra <amodra@gmail.com> | 2022-09-12 18:58:53 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-09-14 10:19:56 +0930 |
commit | 72e366db620f5b2264290d9ba3b62df74bd0c40b (patch) | |
tree | 3261c7fa98793c8c384711dc3a6968e8451c955b /bfd/som.c | |
parent | 3cb5e955a372f0303992340a164a21ca5cf6d006 (diff) | |
download | gdb-72e366db620f5b2264290d9ba3b62df74bd0c40b.zip gdb-72e366db620f5b2264290d9ba3b62df74bd0c40b.tar.gz gdb-72e366db620f5b2264290d9ba3b62df74bd0c40b.tar.bz2 |
ubsan: som_is_space null dereference
On objcopy of fuzzed file.
* som.c (som_write_fixups): Exit loop if space sections all
processed.
Diffstat (limited to 'bfd/som.c')
-rw-r--r-- | bfd/som.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |