summaryrefslogtreecommitdiff
path: root/extra/ettercap/01_pointers_and_ints_dont_mix.diff
blob: 65571309c38c41a52ad09f37c07d5675ce3cf353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
See debian bug #521857, patch from Timothy Redaelli <timothy@redaelli.eu>
Revised by Robert Edmonds <edmonds@debian.org>

--- a/src/protocols/ec_tcp.c
+++ b/src/protocols/ec_tcp.c
@@ -116,7 +116,7 @@
    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);