projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45e25a3
)
* elfcomm.c (get_archive_member_name): Prevent seg-fault if a
author
Nick Clifton
<nickc@redhat.com>
Thu, 7 Feb 2013 16:07:03 +0000
(16:07 +0000)
committer
Nick Clifton
<nickc@redhat.com>
Thu, 7 Feb 2013 16:07:03 +0000
(16:07 +0000)
corrupt archive uses long names but has no long name table.
binutils/elfcomm.c
patch
|
blob
|
history
diff --git
a/binutils/elfcomm.c
b/binutils/elfcomm.c
index a50b1ece382621b4ad786fb7f7440a975ccc4391..64d4b213980c3af5195ec0825e6b734d000b61f7 100644
(file)
--- a/
binutils/elfcomm.c
+++ b/
binutils/elfcomm.c
@@
-586,6
+586,12
@@
get_archive_member_name (struct archive_info *arch,
char *member_file_name;
char *member_name;
+ if (arch->longnames == NULL || arch->longnames_size == 0)
+ {
+ error (_("Archive member uses long names, but no longname table found\n"));
+ return NULL;
+ }
+
arch->nested_member_origin = 0;
k = j = strtoul (arch->arhdr.ar_name + 1, &endp, 10);
if (arch->is_thin_archive && endp != NULL && * endp == ':')