svn commit: r283234 - stable/10/usr.bin/ar
Ed Maste
emaste at FreeBSD.org
Thu May 21 13:30:10 UTC 2015
Author: emaste
Date: Thu May 21 13:30:10 2015
New Revision: 283234
URL: https://svnweb.freebsd.org/changeset/base/283234
Log:
MFC r276774: ar: Avoid null pointer deref while reading corrupt archives
ELF Tool Chain ticket #467
Reported by: Alexander Cherepanov <cherepan at mccme.ru>
Sponsored by: The FreeBSD Foundation
Modified:
stable/10/usr.bin/ar/read.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/usr.bin/ar/read.c
==============================================================================
--- stable/10/usr.bin/ar/read.c Thu May 21 13:29:34 2015 (r283233)
+++ stable/10/usr.bin/ar/read.c Thu May 21 13:30:10 2015 (r283234)
@@ -102,7 +102,8 @@ read_archive(struct bsdar *bsdar, char m
continue;
}
- name = archive_entry_pathname(entry);
+ if ((name = archive_entry_pathname(entry)) == NULL)
+ break;
/* Skip pseudo members. */
if (strcmp(name, "/") == 0 || strcmp(name, "//") == 0)
More information about the svn-src-stable-10
mailing list