ports/122799: ports-mgmt/bpm: patch to fix segfault on index read

Conrad J. Sabatier conrads at cox.net
Tue Apr 15 18:50:02 UTC 2008


>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 15 18:50:02 UTC 2008
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list