]> The Tcpdump Group git mirrors - tcpdump/blobdiff - cpack.c
The patches attached to this email are required to get a fully working tcpdump
[tcpdump] / cpack.c
diff --git a/cpack.c b/cpack.c
index d2e765d4900042520b4f2931d971b33e950f7773..14c0a9ee2a3e06ab1e2391177bf0139255aa0dca 100644 (file)
--- a/cpack.c
+++ b/cpack.c
@@ -32,6 +32,7 @@
 #endif
 
 #include <stdlib.h>
+#include <string.h>
 #include <tcpdump-stdinc.h>
 
 #include "cpack.h"
@@ -132,7 +133,7 @@ int
 cpack_uint8(struct cpack_state *cs, u_int8_t *u)
 {
        /* No space left? */
-       if (cs->c_next - cs->c_buf >= cs->c_len)
+       if ((size_t)(cs->c_next - cs->c_buf) >= cs->c_len)
                return -1;
 
        *u = *cs->c_next;