From: guy Date: Wed, 24 Mar 2004 06:00:51 +0000 (+0000) Subject: Add another check, and fix a check. X-Git-Tag: tcpdump-3.8.2~7 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/199c26153e12edf401f84d11eb8c46ac5e1a6451 Add another check, and fix a check. --- diff --git a/print-cdp.c b/print-cdp.c index 8e2ee11b..195c637f 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.19.2.4 2004-03-24 00:41:33 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.19.2.5 2004-03-24 06:00:51 guy Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -243,11 +243,12 @@ cdp_print_addr(const u_char * p, int l) }; #endif + TCHECK2(*p, 2); num = EXTRACT_32BITS(p); p += 4; while (p < endp && num >= 0) { - TCHECK2(p, 2); + TCHECK2(*p, 2); if (p + 2 > endp) goto trunc; pt = p[0]; /* type of "protocol" field */