From: Michihiro NAKAJIMA Date: Mon, 2 Apr 2012 09:29:48 +0000 (+0900) Subject: Initialize the buffer used for FIEMAP to avoid the error messages X-Git-Tag: v3.1.0~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff7c1a4053f67ce8574833cfb977d6ef297162da;p=thirdparty%2Flibarchive.git Initialize the buffer used for FIEMAP to avoid the error messages valgrind complains about. --- diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c index a43c0adf9..7402b8d8f 100644 --- a/libarchive/archive_read_disk_entry_from_file.c +++ b/libarchive/archive_read_disk_entry_from_file.c @@ -911,6 +911,8 @@ setup_sparse(struct archive_read_disk *a, } } + /* Initialize buffer to avoid the error valgrind complains about. */ + memset(buff, 0, sizeof(buff)); count = (sizeof(buff) - sizeof(*fm))/sizeof(*fe); fm = (struct fiemap *)buff; fm->fm_start = 0;