X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/36800730ae0b78a024465b4a4bc21feec03081b6..2f4b6f3e9f73d19e52b93c0d2a9d11063ddd0788:/print-ldp.c diff --git a/print-ldp.c b/print-ldp.c index edcc9de2..909aecc4 100644 --- a/print-ldp.c +++ b/print-ldp.c @@ -14,8 +14,8 @@ */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.4 2002-12-14 13:50:16 hannes Exp $"; +static const char rcsid[] _U_ = + "@(#) $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 @@ -326,6 +326,9 @@ ldp_print(register const u_char *pptr, register u_int len) { 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 */