#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.72.2.4 2004-03-24 00:04:04 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.72.2.5 2005-04-27 18:42:28 hannes Exp $";
#endif
#include <tcpdump-stdinc.h>
tptr = pptr + len;
break;
}
+ if (advance < 0) /* infinite loop protection */
+ break;
tptr += advance;
}
break;
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.4.2.2 2003-11-16 08:51:31 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.4.2.3 2005-04-27 18:42:29 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
EXTRACT_32BITS(&ldp_msg_header->id),
LDP_MASK_U_BIT(EXTRACT_16BITS(&ldp_msg_header->type)) ? "continue processing" : "ignore");
+ if (msg_len == 0) /* infinite loop protection */
+ break;
+
msg_tptr=tptr+sizeof(struct ldp_msg_header);
msg_tlen=msg_len-sizeof(struct ldp_msg_header)+4; /* Type & Length fields not included */