]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-geneve.c
DNS: Sync types with IANA
[tcpdump] / print-geneve.c
index 06c1e284d3dba97b50cbba0e0ccfcc5335277e54..0b7ff6e514728fd92eaf2d5332106f7bfef428d3 100644 (file)
@@ -156,6 +156,12 @@ geneve_print(netdissect_options *ndo, const u_char *bp, u_int len)
     ndo->ndo_protocol = "geneve";
     ND_PRINT("Geneve");
 
+    if (len < 8) {
+        ND_PRINT(" [length %u < 8]", len);
+        nd_print_invalid(ndo);
+        return;
+    }
+
     ND_TCHECK_8(bp);
 
     ver_opt = GET_U_1(bp);