]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ipcomp.c
Merge branch 'master' of github.com:the-tcpdump-group/tcpdump
[tcpdump] / print-ipcomp.c
index 2504bfd9ae93511900f15130fe68f64e5c7930ce..633de9bedb09df76901393494a569c9d35882f72 100644 (file)
@@ -48,13 +48,13 @@ ipcomp_print(netdissect_options *ndo, register const u_char *bp, int *nhdr _U_)
        int advance;
 #endif
 
-       ipcomp = (struct ipcomp *)bp;
+       ipcomp = (const struct ipcomp *)bp;
        cpi = EXTRACT_16BITS(&ipcomp->comp_cpi);
 
        /* 'ep' points to the end of available data. */
        ep = ndo->ndo_snapend;
 
-       if ((u_char *)(ipcomp + 1) >= ep - sizeof(struct ipcomp)) {
+       if ((const u_char *)(ipcomp + 1) >= ep - sizeof(struct ipcomp)) {
                ND_PRINT((ndo, "[|IPCOMP]"));
                goto fail;
        }