aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r--bfd/xcofflink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 1ca9c2e..9522974 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -4494,7 +4494,10 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo,
if (strings == NULL)
return FALSE;
}
- filename = strings + aux.x_file.x_n.x_offset;
+ if ((bfd_size_type) aux.x_file.x_n.x_offset >= obj_coff_strings_len (input_bfd))
+ filename = _("<corrupt>");
+ else
+ filename = strings + aux.x_file.x_n.x_offset;
indx = _bfd_stringtab_add (flinfo->strtab, filename,
hash, copy);
if (indx == (bfd_size_type) -1)