]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isakmp.c
Use more the ND_TCHECK_1() macro
[tcpdump] / print-isakmp.c
index 641ee734734d59310593fb8b1f5de029a54a3f73..ba1f8fec2cc0db25ec23c9dd5dcdb595033ed36f 100644 (file)
@@ -918,7 +918,7 @@ ikev1_attrmap_print(netdissect_options *ndo,
        int totlen;
        uint32_t t, v;
 
-       ND_TCHECK(p[0]);
+       ND_TCHECK_1(p);
        if (EXTRACT_U_1(p) & 0x80)
                totlen = 4;
        else {
@@ -969,7 +969,7 @@ ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep2)
        int totlen;
        uint32_t t;
 
-       ND_TCHECK(p[0]);
+       ND_TCHECK_1(p);
        if (EXTRACT_U_1(p) & 0x80)
                totlen = 4;
        else {
@@ -3095,7 +3095,7 @@ isakmp_rfc3948_print(netdissect_options *ndo,
                     const u_char *bp, u_int length,
                     const u_char *bp2)
 {
-       ND_TCHECK(bp[0]);
+       ND_TCHECK_1(bp);
        if(length == 1 && EXTRACT_U_1(bp)==0xff) {
                ND_PRINT((ndo, "isakmp-nat-keep-alive"));
                return;
@@ -3104,7 +3104,7 @@ isakmp_rfc3948_print(netdissect_options *ndo,
        if(length < 4) {
                goto trunc;
        }
-       ND_TCHECK(bp[3]);
+       ND_TCHECK_1(bp + 3);
 
        /*
         * see if this is an IKE packet