]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-vqp.c
CVE-2016-7924/Add some bounds checks.
[tcpdump] / print-vqp.c
index 04dbcc2ecc64fabc14356348c197bf03a00b9ddb..44a21935232bb86e14888677a901cbe25bb87296 100644 (file)
  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  * FOR A PARTICULAR PURPOSE.
  *
- * support for the Cisco prop. VQP Protocol
- *
  * Original code by Carles Kishimoto <[email protected]>
  */
 
-#define NETDISSECT_REWORKED
+/* \summary: Cisco VLAN Query Protocol (VQP) printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "extract.h"
 #include "addrtoname.h"
 
@@ -167,8 +166,7 @@ vqp_print(netdissect_options *ndo, register const u_char *pptr, register u_int l
         }
 
         /* did we capture enough for fully decoding the object ? */
-        if (!ND_TTEST2(*tptr, vqp_obj_len))
-            goto trunc;
+        ND_TCHECK2(*tptr, vqp_obj_len);
 
         switch(vqp_obj_type) {
        case VQP_OBJ_IP_ADDRESS: