From nobody@FreeBSD.org  Thu Dec 12 05:50:54 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 6FCCA68F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Dec 2013 05:50:54 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 5CACA1E48
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Dec 2013 05:50:54 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rBC5orX9079913
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Dec 2013 05:50:53 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rBC5orFc079896;
	Thu, 12 Dec 2013 05:50:53 GMT
	(envelope-from nobody)
Message-Id: <201312120550.rBC5orFc079896@oldred.freebsd.org>
Date: Thu, 12 Dec 2013 05:50:53 GMT
From: Phil Stone <phil.stone@gmx.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg audit -F segfault
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         184715
>Category:       ports
>Synopsis:       ports-mgmt/pkg: pkg audit -F segfault
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 12 06:00:00 UTC 2013
>Closed-Date:    Fri Dec 27 22:55:09 UTC 2013
>Last-Modified:  Fri Dec 27 22:55:09 UTC 2013
>Originator:     Phil Stone
>Release:        FreeBSD 8.4-RELEASE-p6
>Organization:
>Environment:
FreeBSD phildek.dev 8.4-RELEASE-p4 FreeBSD 8.4-RELEASE-p4 #0: Mon Sep  9 23:16:13 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Hi,
I've just installed pkg-1.2.3 on FreeBSD 8.4-RELEASE-p6.

Running the command "pkg audit -F" causes a segfault:
# pkg audit -F
Vulnxml file up-to-date.
Segmentation fault (core dumped)
#

>How-To-Repeat:
100% repeatable: just type 'pkg audit -F' on the command prompt

>Fix:
Implementing the following patch solves the issue:
--- audit_orig.c 2013-12-11 03:36:21.390625000 +0100
+++ audit.c 2013-12-11 03:36:59.796875000 +0100
@@ -206,9 +206,10 @@
 
        cleanup:
        unlink(tmp);
-       if (a != NULL)
+       if (a != NULL) {
                archive_read_close(a);
                archive_read_free(a);
+       }
        if (fd >= 0)
                close(fd);



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Dec 14 17:22:57 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184715 

From: "Phil Stone" <phil.stone@gmx.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184715: ports-mgmt/pkg: pkg audit -F segfault
Date: Mon, 16 Dec 2013 12:51:27 +0100

 Bug fixed in pkg 1.2.4
 Cheers,
 Phil
State-Changed-From-To: open->closed 
State-Changed-By: bapt 
State-Changed-When: Fri Dec 27 22:55:08 UTC 2013 
State-Changed-Why:  
Fixed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184715 
>Unformatted:
