]> The Tcpdump Group git mirrors - tcpdump/commitdiff
DCCP: Fix an undefined behavior at runtime
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 12 Nov 2018 14:44:45 +0000 (15:44 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 12 Nov 2018 14:44:45 +0000 (15:44 +0100)
print-dccp.c

index bf1fc28615e5d53951932a6f72a6c15581fb08e4..b2636acbdcfb3819205ee734edcef7f7b7426796 100644 (file)
@@ -298,7 +298,7 @@ dccp_print(netdissect_options *ndo, const u_char *bp, const u_char *data2,
                goto trunc;
        if (len < sizeof(struct dccp_hdr)) {
                ND_PRINT("truncated-dccp - %u bytes missing!",
-                         len - (u_int)sizeof(struct dccp_hdr));
+                        (u_int)sizeof(struct dccp_hdr) - len);
                return;
        }