From owner-cvs-src@FreeBSD.ORG Wed Sep 21 04:48:53 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C91816A41F; Wed, 21 Sep 2005 04:48:53 +0000 (GMT) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D537F43D49; Wed, 21 Sep 2005 04:48:52 +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 j8L4mqFn018987; Wed, 21 Sep 2005 04:48:52 GMT (envelope-from kientzle@repoman.freebsd.org) Received: (from kientzle@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8L4mq4x018986; Wed, 21 Sep 2005 04:48:52 GMT (envelope-from kientzle) Message-Id: <200509210448.j8L4mq4x018986@repoman.freebsd.org> From: Tim Kientzle Date: Wed, 21 Sep 2005 04:48:52 +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.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2005 04:48:53 -0000 kientzle 2005-09-21 04:48:52 UTC FreeBSD src repository Modified files: lib/libarchive archive_read.c Log: In archive_read_open(), do not set the internal archive state to "HEADER" unless the open is successful. Instead, leave the state as "NEW." In particular, if archive_read_open() fails, a subsequent call to archive_read_next_header() will now cause an explicit assertion failure instead of a silent segmentation fault. This may need a little more work to fully realize the intention: If archive_read_open() fails, you should be able to call it again on the same archive handle to open a different archive (or the same archive using a different mechanism). Revision Changes Path 1.18 +4 -2 src/lib/libarchive/archive_read.c