From nobody@FreeBSD.org  Wed Dec 22 22:21:46 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C2CC1106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2010 22:21:46 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id B26898FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2010 22:21:46 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oBMMLkDq059086
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2010 22:21:46 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oBMMLkS4059085;
	Wed, 22 Dec 2010 22:21:46 GMT
	(envelope-from nobody)
Message-Id: <201012222221.oBMMLkS4059085@red.freebsd.org>
Date: Wed, 22 Dec 2010 22:21:46 GMT
From: David Boyd <David.Boyd@insightbb.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: apg -y generates segfault
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         153382
>Category:       ports
>Synopsis:       security/apg: apg -y generates segfault
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    roam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 22 22:30:11 UTC 2010
>Closed-Date:    Thu Dec 23 12:57:57 UTC 2010
>Last-Modified:  Thu Dec 23 12:57:57 UTC 2010
>Originator:     David Boyd
>Release:        7.3-RELEASE-p4
>Organization:
Boyd Consulting Services, LLC
>Environment:
FreeBSD free.bsd1.net 7.3-RELEASE-p4 FreeBSD 7.3-RELEASE-p4 #0: Tue Nov 30 10:25:51 EST 2010     root@free.bsd1.net:/usr/obj/var/cvsup/usr/src/sys/X7SB4  i386

>Description:
apg -y results in segfault.

This appears to be identical to Debian bug #337116 which describes character buffer "salt" as being one byte too small.

I modified apg.c from "char salt[10];" to "char salt[11];" and output appears to be correct.

This problem does not occur with 6.4-RELEASE-p11, but does occur with 8.1-RELEASE-p2.
>How-To-Repeat:
install port security/apg.

run "apg -d -y -n1".
>Fix:
See above description.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->roam 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Dec 22 23:32:08 UTC 2010 
Responsible-Changed-Why:  
Fix synopsis and assign. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/153382: commit references a PR
Date: Thu, 23 Dec 2010 10:54:50 +0000 (UTC)

 roam        2010-12-23 10:54:46 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/apg         Makefile distinfo 
     security/apg/files   patch-aa 
   Added files:
     security/apg/files   patch-apg.c 
   Log:
   Fix a segfault when using the -y option.  While I'm here:
   - remove the MD5 checksum from the distfile
   - note upstream's BSD license
   - OPTIONSify the support for CrackLib
   - add a descriptive patch header to the existing patch-aa
   - remove the packetstorm master site, it only seems to carry a much
     older version of apg
   - bump PORTREVISION for the segfault fix
   
   PR:             153382 (the segfault fix)
   Submitted by:   David Boyd <David.Boyd@insightbb.com>
   
   Revision  Changes    Path
   1.10      +8 -3      ports/security/apg/Makefile
   1.8       +0 -1      ports/security/apg/distinfo
   1.6       +9 -2      ports/security/apg/files/patch-aa
   1.1       +17 -0     ports/security/apg/files/patch-apg.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: roam 
State-Changed-When: Thu Dec 23 12:57:00 UTC 2010 
State-Changed-Why:  
This should be fixed in the just-committed apg-2.3.0b_2. 
Thanks for bringing it up! 

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