]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Initialize buff to all zeros.
authorAndres Mejia <amejia004@gmail.com>
Sun, 24 Feb 2013 17:54:44 +0000 (12:54 -0500)
committerAndres Mejia <amejia004@gmail.com>
Sun, 24 Feb 2013 17:54:44 +0000 (12:54 -0500)
libarchive/test/test_archive_write_add_filter_by_name.c

index ff5ca5b1d4713a5d04ea00f0e806aa676ce43853..68b3ce60b7c54f01c7e0aaba019b3970b7458e45 100644 (file)
@@ -38,7 +38,7 @@ test_filter_by_name(const char *filter_name, int filter_code,
        char *buff;
        int r;
 
-       assert((buff = malloc(buffsize)) != NULL);
+       assert((buff = calloc(1, buffsize)) != NULL);
        if (buff == NULL)
                return;