From 5fc2a6ecd2fadf8dcbbae4a77550e8f067ad3a92 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 9 Mar 1995 23:02:43 +0000 Subject: [PATCH] * config/obj-coff.c (coff_header_append): Check return value of bfd_coff_swap_scnhdr_out. --- gas/ChangeLog | 5 +++++ gas/config/obj-coff.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 9c5baa17d04..abbbcddad57 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 9 18:01:37 1995 Ian Lance Taylor + + * config/obj-coff.c (coff_header_append): Check return value of + bfd_coff_swap_scnhdr_out. + Thu Mar 9 13:51:30 1995 Doug Evans Delete this patch, it breaks the h8300 assembler. diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index 79b9af28752..0fb2d26aba2 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -1834,6 +1834,8 @@ coff_header_append (abfd, h) bfd_coff_swap_scnhdr_out (abfd, &(segment_info[i].scnhdr), buffer); + if (size == 0) + as_bad ("bfd_coff_swap_scnhdr_out failed"); bfd_write (buffer, size, 1, abfd); } } -- 2.30.2