]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-dtp.c
Add CAP_FCNTL and use cap_fcntls_limit().
[tcpdump] / print-dtp.c
index cfdfed3e14995cf7e6a948249713794460d5f27e..5d84a770eecaa78ca44424869b441711dadd8d36 100644 (file)
@@ -53,8 +53,7 @@ dtp_print (netdissect_options *ndo, const u_char *pptr, u_int length)
 
     tptr = pptr;
 
-    if (!ND_TTEST2(*tptr, DTP_HEADER_LEN))
-       goto trunc;
+    ND_TCHECK2(*tptr, DTP_HEADER_LEN);
 
     ND_PRINT((ndo, "DTPv%u, length %u",
            (*tptr),
@@ -71,8 +70,7 @@ dtp_print (netdissect_options *ndo, const u_char *pptr, u_int length)
 
     while (tptr < (pptr+length)) {
 
-        if (!ND_TTEST2(*tptr, 4))
-            goto trunc;
+        ND_TCHECK2(*tptr, 4);
 
        type = EXTRACT_16BITS(tptr);
         len  = EXTRACT_16BITS(tptr+2);