This patch adds a more thorough checking of the packet headers. Without this patch, invalid packets were treated as valid and cased segfaults later on. It also fixes a minor bug where to little memory is reserved for the output directory string.
Getting this on ubuntu when I try to apply patch, any thoughts are appreciated.
Hunk #4 FAILED at 204.
Hunk #5 FAILED at 222.
Hunk #6 FAILED at 248.
Hunk #7 FAILED at 294.
4 out of 8 hunks FAILED -- saving rejects to file tcpxtract.rej
output-dir-str-fix+invalid-packet-detect
Logged In: YES
user_id=1779457
Originator: NO
Getting this on ubuntu when I try to apply patch, any thoughts are appreciated.
Hunk #4 FAILED at 204.
Hunk #5 FAILED at 222.
Hunk #6 FAILED at 248.
Hunk #7 FAILED at 294.
4 out of 8 hunks FAILED -- saving rejects to file tcpxtract.rej
tcpxtract.rej:
***************
*** 194,195
- if (payload_size <= 0)
- return;
--- 204 -----
+
***************
*** 213
-
--- 0 -----
***************
*** 240
- char *dev; /* Sniffing devise */
--- 248 -----
+ char *dev = NULL; /* Sniffing device */
***************
*** 286
- output_prefix = emalloc(strlen(optarg) + 1);
--- 294 -----
+ output_prefix = emalloc(strlen(optarg) + 2);