]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-bootp.c
differentiate between SLARP_LEN and SLARP_MIN_LEN - otherwise we do print the trailin...
[tcpdump] / print-bootp.c
index dbb9f3702dc8f24a5e873d74b99e785c74d0b7c8..d1534c7a3d104019267a819ce17918252b6f7a2b 100644 (file)
  *
  * Format and print bootp packets.
  */
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.79 2005-04-20 10:30:52 guy Exp $ (LBL)";
+#endif
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #include "ether.h"
 #include "bootp.h"
 
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.76 2003-11-15 00:39:17 guy Exp $ (LBL)";
-#endif
 static void rfc1048_print(const u_char *);
 static void cmu_print(const u_char *);
 
@@ -556,6 +556,11 @@ rfc1048_print(register const u_char *bp)
                                break;
 
                        case TAG_CLIENT_FQDN:
+                               /* option 81 should be at least 4 bytes long */
+                               if (len < 4)  {
+                                        printf("ERROR: options 81 len %u < 4 bytes", len);
+                                       break;
+                               }
                                if (*bp++)
                                        printf("[svrreg]");
                                if (*bp)