ports/168336: [PATCH] benchmarks/siege: fix segfault
Martin Matuska
mm at FreeBSD.org
Fri May 25 14:00:22 UTC 2012
>Number: 168336
>Category: ports
>Synopsis: [PATCH] benchmarks/siege: fix segfault
>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: Fri May 25 14:00:21 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Martin Matuska
>Release: FreeBSD 9.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 9.0-STABLE FreeBSD 9.0-STABLE #1 r235218M: Thu May 10 12:01:50 CEST
>Description:
Fix possible segfault by calling freehostent()
Port maintainer (bapt at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: CVS)
>How-To-Repeat:
>Fix:
--- siege-2.70_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/benchmarks/siege/Makefile,v
retrieving revision 1.31
diff -u -r1.31 Makefile
--- Makefile 28 Jul 2010 17:31:01 -0000 1.31
+++ Makefile 25 May 2012 13:57:29 -0000
@@ -7,6 +7,7 @@
PORTNAME= siege
PORTVERSION= 2.70
+PORTREVISION= 1
CATEGORIES= benchmarks
MASTER_SITES= ftp://sid.joedog.org/pub/siege/
Index: files/patch-src-sock.c
===================================================================
RCS file: /home/pcvs/ports/benchmarks/siege/files/patch-src-sock.c,v
retrieving revision 1.1
diff -u -r1.1 patch-src-sock.c
--- files/patch-src-sock.c 7 Jul 2006 14:14:19 -0000 1.1
+++ files/patch-src-sock.c 25 May 2012 13:57:29 -0000
@@ -1,12 +1,20 @@
---- src/sock.c.ORIG Sun Aug 29 13:39:37 2004
-+++ src/sock.c Sun Aug 29 13:38:01 2004
-@@ -132,7 +132,7 @@
- if((gethostbyname_r( hn, &hent, hbf, sizeof(hbf), &hp, &herrno ) < 0)){
- hp = NULL;
+--- src/sock.c.orig 2010-05-17 15:57:59.000000000 +0200
++++ src/sock.c 2012-05-25 15:55:21.743780806 +0200
+@@ -126,7 +126,7 @@
+ hp = NULL;
+ }
}
-#elif defined(sun)
+#elif defined(sun) || defined(__FreeBSD__)
# ifdef HAVE_GETIPNODEBYNAME
- hp = getipnodebyname( hn, AF_INET, 0, &herrno );
+ hp = getipnodebyname(hn, AF_INET, 0, &herrno);
# else /* default use gethostbyname_r*/
-
+@@ -154,7 +154,7 @@
+ if(hp == NULL){ return -1; }
+ memset((void*) &cli, 0, sizeof(cli));
+ memcpy(&cli.sin_addr, hp->h_addr, hp->h_length);
+-#if defined(sun)
++#if defined(sun) || defined(__FreeBSD__)
+ # ifdef HAVE_FREEHOSTENT
+ freehostent(hp);
+ # endif/*HAVE_FREEHOSTENT*/
--- siege-2.70_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list