From owner-svn-src-all@freebsd.org Sun Dec 4 02:58:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 158CFC66354; Sun, 4 Dec 2016 02:58:15 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D957A1D33; Sun, 4 Dec 2016 02:58:14 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uB42wENp060148; Sun, 4 Dec 2016 02:58:14 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uB42wEpJ060147; Sun, 4 Dec 2016 02:58:14 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201612040258.uB42wEpJ060147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sun, 4 Dec 2016 02:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309523 - head/contrib/libarchive/libarchive X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2016 02:58:15 -0000 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 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; }