]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix data types.
authorGuy Harris <[email protected]>
Sat, 15 Sep 2018 08:41:59 +0000 (01:41 -0700)
committerGuy Harris <[email protected]>
Sat, 15 Sep 2018 08:41:59 +0000 (01:41 -0700)
If you're accumulating the lengths of strings, as returned by strlen(),
and passing the result to malloc(), it should be accumulated in a
size_t.

tcpdump.c

index 32075b51ade51b208048cd470d300028a2f7fcf3..19e2d6191d8dc408c0f1d8338b43a128c8b58c21 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -985,7 +985,7 @@ static char *
 copy_argv(char **argv)
 {
        char **p;
-       u_int len = 0;
+       size_t len = 0;
        char *buf;
        char *src, *dst;