From owner-svn-src-head@FreeBSD.ORG Fri Mar 6 04:22:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C927B106566C; Fri, 6 Mar 2009 04:22:34 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B75688FC1D; Fri, 6 Mar 2009 04:22:34 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n264MYoU007795; Fri, 6 Mar 2009 04:22:34 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n264MY3l007794; Fri, 6 Mar 2009 04:22:34 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200903060422.n264MY3l007794@svn.freebsd.org> From: Tim Kientzle Date: Fri, 6 Mar 2009 04:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189428 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 04:22:35 -0000 Author: kientzle Date: Fri Mar 6 04:22:34 2009 New Revision: 189428 URL: http://svn.freebsd.org/changeset/base/189428 Log: Merge r398 from libarchive.googlecode.com: Check that bidder object was allocated before we try to use it. Modified: head/lib/libarchive/archive_read_support_compression_program.c Modified: head/lib/libarchive/archive_read_support_compression_program.c ============================================================================== --- head/lib/libarchive/archive_read_support_compression_program.c Fri Mar 6 04:21:23 2009 (r189427) +++ head/lib/libarchive/archive_read_support_compression_program.c Fri Mar 6 04:22:34 2009 (r189428) @@ -109,12 +109,12 @@ archive_read_support_compression_program struct archive_read_filter_bidder *bidder = __archive_read_get_bidder(a); struct program_bidder *state; - state = (struct program_bidder *)calloc(sizeof (*state), 1); + if (bidder == NULL) + return (ARCHIVE_FATAL); + state = (struct program_bidder *)calloc(sizeof (*state), 1); if (state == NULL) return (ARCHIVE_FATAL); - if (bidder == NULL) - return (ARCHIVE_FATAL); state->cmd = strdup(cmd); state->bid = INT_MAX;