+2020-08-26 Alan Modra <amodra@gmail.com>
+
+ PR 26418
+ * ecofflink.c (WRITE): Don't write size 0 chunks.
+
2020-08-26 Alan Modra <amodra@gmail.com>
* bfdio.c (bfd_get_file_size): Don't segv on NULL adata.
return FALSE;
#define WRITE(ptr, count, size, offset) \
- BFD_ASSERT (symhdr->offset == 0 \
- || (bfd_vma) bfd_tell (abfd) == symhdr->offset); \
- if (bfd_bwrite (debug->ptr, (bfd_size_type) size * symhdr->count, abfd)\
- != size * symhdr->count) \
+ BFD_ASSERT (symhdr->offset == 0 \
+ || (bfd_vma) bfd_tell (abfd) == symhdr->offset); \
+ if (size != 0 \
+ && bfd_bwrite (debug->ptr, \
+ (bfd_size_type) size * symhdr->count, \
+ abfd) != size * symhdr->count) \
return FALSE;
WRITE (line, cbLine, sizeof (unsigned char), cbLineOffset);