From conrads@serene.no-ip.org  Tue Apr 15 18:45:48 2008
Return-Path: <conrads@serene.no-ip.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D45E2106567C
	for <freebsd-gnats-submit@freebsd.org>; Tue, 15 Apr 2008 18:45:48 +0000 (UTC)
	(envelope-from conrads@serene.no-ip.org)
Received: from eastrmmtai113.cox.net (eastrmmtai113.cox.net [68.230.240.32])
	by mx1.freebsd.org (Postfix) with ESMTP id 6198C8FC27
	for <freebsd-gnats-submit@freebsd.org>; Tue, 15 Apr 2008 18:45:47 +0000 (UTC)
	(envelope-from conrads@serene.no-ip.org)
Received: from eastrmimpo01.cox.net ([68.1.16.119])
          by eastrmmtao104.cox.net
          (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP
          id <20080415182237.UYDG27061.eastrmmtao104.cox.net@eastrmimpo01.cox.net>;
          Tue, 15 Apr 2008 14:22:37 -0400
Received: from serene.no-ip.org ([72.204.149.54])
	by eastrmimpo01.cox.net with bizsmtp
	id DuNY1Z00W1AflDk02uNd2J; Tue, 15 Apr 2008 14:22:45 -0400
Received: from serene.no-ip.org (smmsp@localhost [127.0.0.1])
	by serene.no-ip.org (8.14.2/8.14.2) with ESMTP id m3FIMSqL067513;
	Tue, 15 Apr 2008 13:22:28 -0500 (CDT)
	(envelope-from conrads@serene.no-ip.org)
Received: (from root@localhost)
	by serene.no-ip.org (8.14.2/8.14.2/Submit) id m3FIMQUw067487;
	Tue, 15 Apr 2008 13:22:26 -0500 (CDT)
	(envelope-from conrads)
Message-Id: <200804151822.m3FIMQUw067487@serene.no-ip.org>
Date: Tue, 15 Apr 2008 13:22:26 -0500 (CDT)
From: "Conrad J. Sabatier" <conrads@cox.net>
Reply-To: "Conrad J. Sabatier" <conrads@cox.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sethk@meowfishies.com
Subject: ports-mgmt/bpm: patch to fix segfault on index read
X-Send-Pr-Version: 3.113
X-GNATS-Notify: sethk@meowfishies.com

>Number:         122799
>Category:       ports
>Synopsis:       ports-mgmt/bpm: patch to fix segfault on index read
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 15 18:50:02 UTC 2008
>Closed-Date:    Sat Apr 26 07:08:00 UTC 2008
>Last-Modified:  Sat Apr 26 07:10:00 UTC 2008
>Originator:     Conrad J. Sabatier
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD serene.no-ip.org 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon Apr 14 18:10:07 CDT 2008 root@:/usr/obj/usr/src/sys/CUSTOM amd64


>Description:
	Increase size of line buffer when reading ports index to prevent
	SIGSEG
>How-To-Repeat:
	Running bpm in current state segfaults on initial read of ports
	index due to insufficient line buffer space
>Fix:
	Patch below doubles the size of the line buffer and clears up the 
	problem.

--- bpm.diff begins here ---
Index: ports-mgmt/bpm/files/patch-src::refresh.c
===================================================================
RCS file: /home/ncvs/ports/ports-mgmt/bpm/files/patch-src::refresh.c,v
retrieving revision 1.6
diff -d -u -r1.6 patch-src::refresh.c
--- ports-mgmt/bpm/files/patch-src::refresh.c	6 Mar 2008 00:32:25 -0000	1.6
+++ ports-mgmt/bpm/files/patch-src::refresh.c	15 Apr 2008 18:06:25 -0000
@@ -16,7 +16,7 @@
  #define	INDEX_FN    PORTS_BASE "/INDEX"
 -#define INDEX_MAXLN 4096
 +#endif
-+#define INDEX_MAXLN 8192
++#define INDEX_MAXLN 16384
  #define DB_DIR	    "/var/db/pkg"
  #define ITER_BYTES  (128 * 1024)
  #define ITER_ENTS   32
--- bpm.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Apr 15 18:50:10 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Seth Kingsley <sethk@meowfishies.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/122799: ports-mgmt/bpm: patch to fix segfault on index
	read
Date: Tue, 15 Apr 2008 14:40:21 -0700

 On Tue, Apr 15, 2008 at 06:50:09PM +0000, Edwin Groothuis wrote:
 > Please note that PR ports/122799 has just been submitted.
 
 I agree to this patch; please submit it.
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Tue Apr 15 22:10:44 UTC 2008 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122799 
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Sat Apr 26 07:07:59 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/122799: commit references a PR
Date: Sat, 26 Apr 2008 07:07:59 +0000 (UTC)

 rafan       2008-04-26 07:07:55 UTC
 
   FreeBSD ports repository
 
   Modified files:
     ports-mgmt/bpm       Makefile 
     ports-mgmt/bpm/files patch-src::refresh.c 
   Log:
   - Increase read buffer to avoid SEGV when reading INDEX
   - Bump PORTREVISION
   
   PR:             ports/122799
   Submitted by:   Conrad J. Sabatier <conrads at cox.net>
   Approved by:    Seth Kingsley <sethk at meowfishies.com> (maintainer)
   
   Revision  Changes    Path
   1.19      +1 -1      ports/ports-mgmt/bpm/Makefile
   1.7       +1 -1      ports/ports-mgmt/bpm/files/patch-src::refresh.c
 _______________________________________________
 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"
 
>Unformatted:
