From owner-cvs-all@FreeBSD.ORG Wed Mar 12 21:10:26 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D7611065670; Wed, 12 Mar 2008 21:10:26 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9433D8FC13; Wed, 12 Mar 2008 21:10:26 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2CLAQuH013917; Wed, 12 Mar 2008 21:10:26 GMT (envelope-from kaiw@repoman.freebsd.org) Received: (from kaiw@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2CLAQPC013916; Wed, 12 Mar 2008 21:10:26 GMT (envelope-from kaiw) Message-Id: <200803122110.m2CLAQPC013916@repoman.freebsd.org> From: Kai Wang Date: Wed, 12 Mar 2008 21:10:26 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libarchive archive_read_support_format_ar.c src/lib/libarchive/test test_read_format_ar.c test_write_format_ar.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 12 Mar 2008 21:10:26 -0000 kaiw 2008-03-12 21:10:26 UTC FreeBSD src repository Modified files: lib/libarchive archive_read_support_format_ar.c lib/libarchive/test test_read_format_ar.c test_write_format_ar.c Log: Current 'ar' read support in libarchive can only handle a GNU/SVR4 filename table whose size is less than 65536 bytes. The original intention was to not consume the filename table, so the client will have a chance to look at it. To achieve that, the library call decompressor->read_ahead to read(look ahead) but do not call decompressor->consume to consume the data, thus a limit was raised since read_ahead call can only look ahead at most BUFFER_SIZE(65536) bytes at the moment, and you can not "look any further" before you consume what you already "saw". This commit will turn GNU/SVR4 filename table into "archive format data", i.e., filename table will be consumed by libarchive, so the 65536-bytes limit will be gone, but client can no longer have access to the content of filename table. 'ar' support test suite is changed accordingly. BSD ar(1) is not affected by this change since it doesn't look at the filename table. Reported by: erwin Discussed with: jkoshy, kientzle Reviewed by: jkoshy, kientzle Approved by: jkoshy(mentor), kientzle Revision Changes Path 1.9 +39 -36 src/lib/libarchive/archive_read_support_format_ar.c 1.5 +1 -3 src/lib/libarchive/test/test_read_format_ar.c 1.6 +1 -3 src/lib/libarchive/test/test_write_format_ar.c