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 <chere...@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) _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"