ar: Avoid null pointer deref while reading corrupt archives
ELF Tool Chain ticket #467 Reported by: Alexander Cherepanov <cherepan@mccme.ru> MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
d5edbbc623
commit
63bf16a1c4
@ -102,7 +102,8 @@ read_archive(struct bsdar *bsdar, char mode)
|
||||
continue;
|
||||
}
|
||||
|
||||
name = archive_entry_pathname(entry);
|
||||
if ((name = archive_entry_pathname(entry)) == NULL)
|
||||
break;
|
||||
|
||||
/* Skip pseudo members. */
|
||||
if (strcmp(name, "/") == 0 || strcmp(name, "//") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user