tcpdump/tcpdump-3.8.3-rsvp-dos.patch

32 lines
1.0 KiB
Diff
Raw Normal View History

--- tcpdump-3.8.3/print-rsvp.c.old 2004-03-24 05:00:38.000000000 +0100
+++ tcpdump-3.8.3/print-rsvp.c 2005-04-27 17:09:34.000000000 +0200
@@ -872,6 +872,8 @@
case RSVP_OBJ_RRO:
case RSVP_OBJ_ERO:
+ {
+ int step;
switch(rsvp_obj_ctype) {
case RSVP_CTYPE_IPV4:
while(obj_tlen >= 4 ) {
@@ -889,15 +891,16 @@
"none",
*(obj_tptr+7))); /* rfc3209 says that this field is rsvd. */
}
- obj_tlen-=*(obj_tptr+1);
- obj_tptr+=*(obj_tptr+1);
+ step = *(obj_tptr+1) ? *(obj_tptr+1) : obj_tlen;
+ obj_tlen -= step;
+ obj_tptr += step;
}
break;
default:
hexdump=TRUE;
}
break;
-
+ }
case RSVP_OBJ_HELLO:
switch(rsvp_obj_ctype) {
case RSVP_CTYPE_1: