]> The Tcpdump Group git mirrors - tcpdump/blobdiff - in_cksum.c
CVE-2017-13687/CHDLC: Improve bounds and length checks.
[tcpdump] / in_cksum.c
index caf4b6af40f42925d38c3a142555f23abb2fef6f..e9bed2287ae626f9e263e09c51170a6738f7fea7 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 /*
  * Checksum routine for Internet Protocol family headers (Portable Version).
@@ -92,7 +92,7 @@ in_cksum(const struct cksum_vec *vec, int veclen)
                /*
                 * Force to even boundary.
                 */
-               if ((1 & (unsigned long) w) && (mlen > 0)) {
+               if ((1 & (uintptr_t) w) && (mlen > 0)) {
                        REDUCE;
                        sum <<= 8;
                        s_util.c[0] = *(const uint8_t *)w;