Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Oct 2008 15:17:28 GMT
From:      Jeff Blank <jfb@mr-happy.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/128346: comms/qpage error in patch from ports/128216
Message-ID:  <200810241517.m9OFHSbr013920@www.freebsd.org>
Resent-Message-ID: <200810241520.m9OFK2ns097934@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         128346
>Category:       ports
>Synopsis:       comms/qpage error in patch from ports/128216
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 24 15:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Blank
>Release:        6.4, 7.0, 7.1-PRERELEASE
>Organization:
>Environment:
>Description:
The patch I submitted with ports/128216 contains a logic error and in fact perpetuate the problem I intended to correct by not leaving space in the reallocated string for the (char)0 string terminator (though apparently without causing problems for my qpage installation, which is why I didn't catch it previously).
>How-To-Repeat:

>Fix:
Please apply the attached diff.

Patch attached with submission follows:

===> Generating patch
===> Viewing diff with less
diff -ruN --exclude=CVS /usr/ports/comms/qpage.orig/Makefile /usr/ports/comms/qpage/Makefile
--- /usr/ports/comms/qpage.orig/Makefile	2008-10-24 06:14:05.000000000 -0400
+++ /usr/ports/comms/qpage/Makefile	2008-10-24 11:01:54.332378113 -0400
@@ -7,7 +7,7 @@
 
 PORTNAME=	qpage
 PORTVERSION=	3.3
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	comms
 MASTER_SITES=	http://www.qpage.org/download/
 EXTRACT_SUFX=	.tar.Z
diff -ruN --exclude=CVS /usr/ports/comms/qpage.orig/files/patch-srvrsnpp.c /usr/ports/comms/qpage/files/patch-srvrsnpp.c
--- /usr/ports/comms/qpage.orig/files/patch-srvrsnpp.c	2008-10-19 04:09:02.000000000 -0400
+++ /usr/ports/comms/qpage/files/patch-srvrsnpp.c	2008-10-24 11:00:56.000000000 -0400
@@ -1,5 +1,5 @@
 --- srvrsnpp.c.orig	1998-10-25 14:55:05.000000000 -0500
-+++ srvrsnpp.c	2008-10-18 18:09:44.175331511 -0400
++++ srvrsnpp.c	2008-10-24 11:00:36.226381386 -0400
 @@ -523,6 +523,7 @@
  	char		*errmsg;
  	char		*a;
@@ -13,7 +13,7 @@
  				p->created = time(NULL);
  				(void)sprintf(buff, "%d", pagecount++);
 -				(void)strcat(p->messageid, buff);
-+				m = (void *)malloc(sizeof(*m) * strlen(p->messageid) + sizeof(*m) * strlen(buff));
++				m = (void *)malloc(sizeof(*m) * (strlen(p->messageid) + strlen(buff) + 1));
 +				if ( m == NULL ) {
 +					message("554 Message failed (out of memory)");
 +					qpage_log(LOG_ERR, "snpp(): cannot allocate memory for p->messageid");
===> Done


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810241517.m9OFHSbr013920>