diff --git a/external/gpl3/gdb/dist/bfd/merge.c b/external/gpl3/gdb/dist/bfd/merge.c index 174ec90bff2a..28f15037a30b 100644 --- a/external/gpl3/gdb/dist/bfd/merge.c +++ b/external/gpl3/gdb/dist/bfd/merge.c @@ -334,7 +334,7 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry, /* Trailing alignment needed? */ off = sec->size - off; - if (off != 0) + if (pad != NULL && off != 0) { if (contents) memcpy (contents + offset, pad, off);