]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Initialize the buffer used for FIEMAP to avoid the error messages
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 2 Apr 2012 09:29:48 +0000 (18:29 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 2 Apr 2012 09:30:10 +0000 (18:30 +0900)
valgrind complains about.

libarchive/archive_read_disk_entry_from_file.c

index a43c0adf9c2abeab1e1c5770bad40737d12462ef..7402b8d8f66635d4bafc799a3c0f4a6a21903994 100644 (file)
@@ -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;