From owner-cvs-all@FreeBSD.ORG Sat Apr 23 17:46:51 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCAA816A4CE; Sat, 23 Apr 2005 17:46:51 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A43F743D39; Sat, 23 Apr 2005 17:46:51 +0000 (GMT) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j3NHkpp2092672; Sat, 23 Apr 2005 17:46:51 GMT (envelope-from kientzle@repoman.freebsd.org) Received: (from kientzle@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j3NHkpPx092671; Sat, 23 Apr 2005 17:46:51 GMT (envelope-from kientzle) Message-Id: <200504231746.j3NHkpPx092671@repoman.freebsd.org> From: Tim Kientzle Date: Sat, 23 Apr 2005 17:46:51 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libarchive archive_write_set_format_pax.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2005 17:46:51 -0000 kientzle 2005-04-23 17:46:51 UTC FreeBSD src repository Modified files: lib/libarchive archive_write_set_format_pax.c Log: Certain filenames between 245 and 255 characters long would cause an internal error if pax extended attributes were being generated. Being < 255 characters, the first-pass path editing (to generate a ustar-compatible name for the main entry) wouldn't occur, and the second-pass path editing (to generate a ustar name for the pax attributes entry) assumed the input was already < 245 chars. The core problem here was using an abbreviated algorithm for the second pass that relied on the first pass having already run. The rewritten code is much simpler: It just uses the full path-shortening algorithm for building both ustar pathnames. This way, the second ustar pathname will always be short enough. Thanks to: Mark Cammidge Related to: bin/74385 Revision Changes Path 1.26 +72 -71 src/lib/libarchive/archive_write_set_format_pax.c