From: Andres Mejia Date: Sun, 24 Feb 2013 17:54:44 +0000 (-0500) Subject: Initialize buff to all zeros. X-Git-Tag: v3.1.900a~360^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1016793be6f7ff9f451a60c997c356ea83759562;p=thirdparty%2Flibarchive.git Initialize buff to all zeros. --- diff --git a/libarchive/test/test_archive_write_add_filter_by_name.c b/libarchive/test/test_archive_write_add_filter_by_name.c index ff5ca5b1d..68b3ce60b 100644 --- a/libarchive/test/test_archive_write_add_filter_by_name.c +++ b/libarchive/test/test_archive_write_add_filter_by_name.c @@ -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;