summaryrefslogtreecommitdiff
path: root/libarchive/archive_entry_stat.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2011-11-08 23:15:36 -0500
committerTim Kientzle <kientzle@gmail.com>2011-11-08 23:15:36 -0500
commit8e634fe8b69f8116a62d4db0cdc2bc2bf66890f6 (patch)
treee583e59f5a9061b4a97fa45efec5d54f0df13632 /libarchive/archive_entry_stat.c
parentaf6f12b916eed7106ff60d6743bb340bc2fca7d9 (diff)
downloadlibarchive-8e634fe8b69f8116a62d4db0cdc2bc2bf66890f6.tar.gz
Issue 191: Clear struct stat so that fields not explicitly
set by libarchive won't have garbage values. SVN-Revision: 3760
Diffstat (limited to 'libarchive/archive_entry_stat.c')
-rw-r--r--libarchive/archive_entry_stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libarchive/archive_entry_stat.c b/libarchive/archive_entry_stat.c
index ad772c95..d5ed1cb1 100644
--- a/libarchive/archive_entry_stat.c
+++ b/libarchive/archive_entry_stat.c
@@ -41,7 +41,7 @@ archive_entry_stat(struct archive_entry *entry)
{
struct stat *st;
if (entry->stat == NULL) {
- entry->stat = malloc(sizeof(*st));
+ entry->stat = calloc(1, sizeof(*st));
if (entry->stat == NULL)
return (NULL);
entry->stat_valid = 0;