openbsd-ports/net/ettercap/patches/patch-src_protocols_ec_tcp_c
dcoppa 35d3724ea0 Fix segfault when trying to scan for hosts on 64bit systems.
From Debian, but tweaked by naddy@

ok landry@, naddy@
2011-08-02 18:40:16 +00:00

17 lines
593 B
Plaintext

$OpenBSD: patch-src_protocols_ec_tcp_c,v 1.1 2011/08/02 18:40:16 dcoppa Exp $
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 *)tcp + tcp->off * 4;
DECODED_LEN = (u_int32)(tcp->off * 4);