On Tue, 02 Aug 2011, Landry Breuil wrote:

> Add a comment stating where the debian fix can be found and i'm fine
> with it.

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/ettercap/Makefile,v
retrieving revision 1.52
diff -u -p -r1.52 Makefile
--- Makefile    26 Nov 2010 14:56:14 -0000      1.52
+++ Makefile    2 Aug 2011 08:33:20 -0000
@@ -7,7 +7,7 @@ COMMENT=        multi-purpose sniffer/intercept
 VER=           0.7.3
 DISTNAME=      ettercap-NG-${VER}
 PKGNAME=       ettercap-${VER}
-REVISION=      6
+REVISION=      7
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=ettercap/}
 
Index: patches/patch-src_protocols_ec_tcp_c
===================================================================
RCS file: patches/patch-src_protocols_ec_tcp_c
diff -N patches/patch-src_protocols_ec_tcp_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_protocols_ec_tcp_c        2 Aug 2011 08:33:20 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Fix segfault when trying to scan for hosts on 64bit systems
+(from Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521857)
+
+--- src/protocols/ec_tcp.c.orig        Tue Sep 28 11:56:13 2004
++++ src/protocols/ec_tcp.c     Tue Aug  2 09:59:46 2011
+@@ -116,7 +116,7 @@ FUNC_DECODER(decode_tcp)
+    tcp = (struct tcp_header *)DECODE_DATA;
+    
+    opt_start = (u_char *)(tcp + 1);
+-   opt_end = (u_char *)((int)tcp + tcp->off * 4);
++   opt_end = (u_char *)(((u_char *)tcp) + tcp->off * 4);
+ 
+    DECODED_LEN = (u_int32)(tcp->off * 4);
+ 

Reply via email to