27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
diff -pur tcpdump-3.9.1/print-ascii.c tcpdump-3.9.1-fixed/print-ascii.c
|
|
--- tcpdump-3.9.1/print-ascii.c 2004-07-22 00:00:10.000000000 +0200
|
|
+++ tcpdump-3.9.1-fixed/print-ascii.c 2005-07-06 15:28:22.000000000 +0200
|
|
@@ -142,6 +142,9 @@ hex_print_with_offset(register const cha
|
|
register int nshorts;
|
|
|
|
nshorts = (u_int) length / sizeof(u_short);
|
|
+ if(!nshorts)
|
|
+ return;
|
|
+
|
|
i = 0;
|
|
while (--nshorts >= 0) {
|
|
if ((i++ % 8) == 0) {
|
|
diff -pur tcpdump-3.9.1/print-ldp.c tcpdump-3.9.1-fixed/print-ldp.c
|
|
--- tcpdump-3.9.1/print-ldp.c 2005-06-16 03:10:35.000000000 +0200
|
|
+++ tcpdump-3.9.1-fixed/print-ldp.c 2005-07-06 15:21:24.000000000 +0200
|
|
@@ -559,7 +559,8 @@ ldp_msg_print(register const u_char *ppt
|
|
return 0;
|
|
|
|
msg_tptr=tptr+sizeof(struct ldp_msg_header);
|
|
- msg_tlen=msg_len-sizeof(struct ldp_msg_header)+4; /* Type & Length fields not included */
|
|
+ /* Type & Length fields not included */
|
|
+ msg_tlen = (msg_len >= (sizeof(struct ldp_msg_header) + 4)) ? (msg_len - sizeof(struct ldp_msg_header) + 4) : 0;
|
|
|
|
/* did we capture enough for fully decoding the message ? */
|
|
if (!TTEST2(*tptr, msg_len))
|