Author: mm Date: Sun Dec 4 02:58:13 2016 New Revision: 309523 URL: https://svnweb.freebsd.org/changeset/base/309523
Log: Relax sanity check of number fields in tar header even more. This fixes reading tar archives created by older versions of plexus-archiver (used by maven-assembly-plugin) that fill uid and gid fields with spaces (PLXCOMP-233). Vendor issue: https://github.com/libarchive/libarchive/issues/832 Reported by: Antoine Brodin <anto...@freebsd.org> MFC after: 1 week Modified: head/contrib/libarchive/libarchive/archive_read_support_format_tar.c Modified: head/contrib/libarchive/libarchive/archive_read_support_format_tar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_tar.c Sun Dec 4 02:15:46 2016 (r309522) +++ head/contrib/libarchive/libarchive/archive_read_support_format_tar.c Sun Dec 4 02:58:13 2016 (r309523) @@ -324,11 +324,7 @@ validate_number_field(const char* p_fiel while (i < i_size && p_field[i] == ' ') { ++i; } - /* Must be at least one octal digit. */ - if (i >= i_size || p_field[i] < '0' || p_field[i] > '7') { - return 0; - } - /* Skip remaining octal digits. */ + /* Skip octal digits. */ while (i < i_size && p_field[i] >= '0' && p_field[i] <= '7') { ++i; } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"