]> The Tcpdump Group git mirrors - tcpdump/commitdiff
from Darren Reed <[email protected]>:
authorhannes <hannes>
Tue, 13 Jul 2004 16:00:25 +0000 (16:00 +0000)
committerhannes <hannes>
Tue, 13 Jul 2004 16:00:25 +0000 (16:00 +0000)
  catch the self-set null pointer if handle_ctrl_proto()
  stumbles across an unknown control-proto for which we
  have no specific options decoder;

print-ppp.c

index 9d5e8a72263085283f1c9f69728ac271b5bba865..0b4799b6de5029921b7d7049553e64d94a9897f1 100644 (file)
@@ -31,7 +31,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
@@ -442,6 +442,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;