summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-12-05 23:20:08 -0600
committerDan McGee <dan@archlinux.org>2011-12-05 23:21:56 -0600
commit6a1d3948a670184f01a697efe55b91b4ccdcb51d (patch)
tree9e78598724477cfdb683b204db8df2224c8f4c7b
parent17e0be9e6a5ed1cf5611e23d3c9debd0a3248077 (diff)
downloadpacman-6a1d3948a670184f01a697efe55b91b4ccdcb51d.tar.xz
Use correct size in memset
We were using the size of a pointer, not the size of the whole archive_read_buffer struct. Thanks to Clang/LLVM 3.0 and Allan/Dave in IRC for finding this one. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index c89f3c9c..ad15d937 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -1000,7 +1000,7 @@ cleanup:
{
int ret = b->ret;
FREE(b->line);
- memset(b, 0, sizeof(b));
+ memset(b, 0, sizeof(struct archive_read_buffer));
return ret;
}
}