mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
oss-fuzz: vms-alpha segfault in image_write_section
Yet another case where a fuzzed object file triggers a crash in the vms-alpha support. * vms-alpha.c (image_write_section): Don't segfault on NULL image_section.
This commit is contained in:
parent
e0fe0e3abd
commit
95451ea43a
1 changed files with 2 additions and 1 deletions
|
|
@ -1603,7 +1603,8 @@ image_write_section (bfd *abfd)
|
|||
{
|
||||
asection *sec = PRIV (image_section);
|
||||
|
||||
if ((sec->flags & SEC_IN_MEMORY) != 0 && sec->contents == NULL)
|
||||
if (sec == NULL
|
||||
|| ((sec->flags & SEC_IN_MEMORY) != 0 && sec->contents == NULL))
|
||||
return NULL;
|
||||
return sec;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue