FS#25528 - [ettercap] debian patch is an old one that causes problems

Attached to Project: Arch Linux
Opened by Devin Cofer (Ranguvar) - Friday, 12 August 2011, 07:36 GMT
Last edited by Giovanni Scafora (giovanni) - Friday, 12 August 2011, 21:36 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Giovanni Scafora (giovanni)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

ettercap has a patch, 01_pointers_and_ints_dont_mix.diff.

The contents are:
See debian bug #521857, patch from Timothy Redaelli <timothy@redaelli.eu>

--- ettercap-0.7.3.orig/src/protocols/ec_tcp.c
+++ ettercap-0.7.3/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 *)(tcp + tcp->off * 4);

DECODED_LEN = (u_int32)(tcp->off * 4);


However, this is an old version of the correct patch. As noted here: http://ubuntuforums.org/showthread.php?t=1555044
It causes issues with ettercap's operation.
The poster in that thread recommends casting to long, but even that was decided against in the bug thread: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521857

Eventually, it was settled to cast to u_char. This has no issues. Check the bug thread to see the latest patch (which patches our (and their) current patch).
This task depends upon

Closed by  Giovanni Scafora (giovanni)
Friday, 12 August 2011, 21:36 GMT
Reason for closing:  Fixed

Loading...