mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 17:52:43 +00:00
MFC r276774: ar: Avoid null pointer deref while reading corrupt archives
ELF Tool Chain ticket #467 Reported by: Alexander Cherepanov <cherepan@mccme.ru> Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
e8319c522f
commit
6a0493a4d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=283234
@ -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