tFix uninitialized memory - dedup - deduplicating backup program
(HTM) git clone git://git.z3bra.org/dedup.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 5bebcbec44537372fcd4e178fdc4057d6d04f783
(DIR) parent 2133dd9a0b1eb34bb850d868da0f4c209aa8cc53
(HTM) Author: sin <sin@2f30.org>
Date: Tue, 20 Mar 2018 18:19:16 +0000
Fix uninitialized memory
Bug found by Evil_Bob, thanks!
Diffstat:
M dedup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/dedup.c b/dedup.c
t@@ -108,7 +108,7 @@ alloc_ent(void)
{
struct ent *ent;
- ent = malloc(sizeof(*ent));
+ ent = calloc(1, sizeof(*ent));
if (ent == NULL)
err(1, "malloc");
return ent;