From: hannes Date: Tue, 13 Jul 2004 15:54:05 +0000 (+0000) Subject: from Darren Reed : X-Git-Tag: tcpdump-3.9.1~310 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/6df70cbc6d4c65200d373399d2e273c6b42e5196?hp=fb8b947488c7f22b518de1df1a91e663dc7ab33c from Darren Reed : catch the self-set null pointer if handle_ctrl_proto() stumbles across an unknown control-proto for which we have no specific options decoder; --- diff --git a/print-ppp.c b/print-ppp.c index cfa92e5e..020cb31b 100644 --- a/print-ppp.c +++ b/print-ppp.c @@ -31,7 +31,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.98 2004-07-06 22:11:17 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.99 2004-07-13 15:54:05 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -448,6 +448,10 @@ handle_ctrl_proto(u_int proto, const u_char *pptr, int length) pfunc = NULL; break; } + + if (pfunc == NULL) /* catch the above null pointer if unknown CP */ + break; + if ((j = (*pfunc)(tptr, len)) == 0) break; x -= j;