summaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-08-05 08:25:17 +0000
committerNick Clifton <nickc@redhat.com>2003-08-05 08:25:17 +0000
commitefbf64fb043ac2a2330d0bd4a163727cec9d871b (patch)
tree2787a7924719f35737071d598e44451d494db59d /bfd/coffcode.h
parent2a66b586bd08fc53d1b6a787d2dafa40f0f1dc86 (diff)
downloadbinutils-redhat-efbf64fb043ac2a2330d0bd4a163727cec9d871b.tar.gz
Detect and issue a warning message if the line number table could not be read.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index b8dde1ab28..3b39f095af 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -4407,6 +4407,13 @@ coff_slurp_line_table (abfd, asect)
amt = (bfd_size_type) bfd_coff_linesz (abfd) * asect->lineno_count;
native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, amt);
+ if (native_lineno == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: warning: line number table read failed"),
+ bfd_archive_filename (abfd));
+ return FALSE;
+ }
amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
lineno_cache = (alent *) bfd_alloc (abfd, amt);
if (lineno_cache == NULL)