]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-bootp.c
Give a URL for the Zephyr protocol spec.
[tcpdump] / print-bootp.c
index 410bde37c7f2f86a015e8451c658738e746253c2..d1534c7a3d104019267a819ce17918252b6f7a2b 100644 (file)
@@ -22,7 +22,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.77 2003-11-16 09:36:15 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.79 2005-04-20 10:30:52 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -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)