diff options
author | bms <bms@FreeBSD.org> | 2005-01-24 14:56:48 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2005-01-24 14:56:48 +0000 |
commit | 219be4fec7f3194e6971463f779eac4b2a8024b6 (patch) | |
tree | d5e8fd3f4acb6d0f64a9f7e0db9719af87cf5e26 /contrib | |
parent | 730f6f1d859725dfcdbbe48924e3e0d57cd6472c (diff) | |
download | FreeBSD-src-219be4fec7f3194e6971463f779eac4b2a8024b6.zip FreeBSD-src-219be4fec7f3194e6971463f779eac4b2a8024b6.tar.gz |
Fix NULL pointer dereference bug when parsing IPV6CP traffic.
This file is already off the vendor branch, and the fix will be
in future tcpdump.org vendor branch imports.
PR: bin/76497
MFC after: 1 week
Obtained from: tcpdump.org rev 1.89.2.4
Discussed with: fenner, keramida
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/tcpdump/print-ppp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/tcpdump/print-ppp.c b/contrib/tcpdump/print-ppp.c index 01febb8..c63b197 100644 --- a/contrib/tcpdump/print-ppp.c +++ b/contrib/tcpdump/print-ppp.c @@ -33,7 +33,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.89.2.3 2004/03/24 03:32:43 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.89.2.4 2004/07/13 16:00:25 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -444,6 +444,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; |