]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use more the nd_print_trunc() call
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 18 May 2018 09:14:27 +0000 (11:14 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 18 May 2018 09:16:21 +0000 (11:16 +0200)
Update the output of a test accordingly.

print-ah.c
tests/heapoverflow-ip_print_demux.out

index 75baea2ed85577c33f7989d5a56021d1b012a104..735226f696ecdf045067460c2cb2c7ffbf0d4c85 100644 (file)
@@ -52,10 +52,7 @@ ah_print(netdissect_options *ndo, const u_char *bp)
                ND_PRINT(",sumlen=%u", sumlen);
        ND_TCHECK_4(ah + 1);
        ND_PRINT(",seq=0x%x", EXTRACT_BE_U_4(ah + 1));
-       if (!ND_TTEST_LEN(bp, sizeof(struct ah) + sumlen)) {
-               ND_PRINT("[truncated]):");
-               return -1;
-       }
+       ND_TCHECK_LEN(bp, sizeof(struct ah) + sumlen);
        ND_PRINT("): ");
 
        return sizeof(struct ah) + sumlen;
index f97baf995d0b196fdad063a12aa158d3459c70b2..29aedaa89985a379ad3cabb8176aec6b9238bafd 100644 (file)
@@ -3,4 +3,4 @@
        0x0010:  3030 3030 3030 3030 3030 3030 3030 3030  0000000000000000
        0x0020:  3030                                     00
 IP (tos 0x30, ttl 48, id 12336, offset 0, flags [none], proto AH (51), length 12336, bad cksum 3030 (->697b)!)
-    48.48.48.48 > 48.48.48.48: AH(spi=0x30303030,sumlen=192,seq=0x30303030[truncated]):
+    48.48.48.48 > 48.48.48.48: AH(spi=0x30303030,sumlen=192,seq=0x30303030 [|ah]