Initialize reserved fields to 0 - dedup - deduplicating backup program HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 381646ad5b2c3aea7891364f352466fc3ea51e68 DIR parent c3903829beb99b52fe47b86b42ee6cc9088948e2 HTML Author: sin <sin@2f30.org> Date: Mon, 13 May 2019 23:01:51 +0100 Initialize reserved fields to 0 Diffstat: M bcompress.c | 1 + M bencrypt.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) --- DIR diff --git a/bcompress.c b/bcompress.c @@ -212,6 +212,7 @@ bcput(struct bctx *bctx, void *buf, size_t n, unsigned char *md) /* Prepend compression descriptor */ cd.type = cctx->type; + memset(cd.reserved, 0, sizeof(cd.reserved)); cd.size = cn; packcd(cbuf, &cd); DIR diff --git a/bencrypt.c b/bencrypt.c @@ -207,6 +207,7 @@ beput(struct bctx *bctx, void *buf, size_t n, unsigned char *md) /* Prepend the encryption descriptor */ ed.type = ectx->type; + memset(ed.reserved, 0, sizeof(ed.reserved)); ed.size = en; /* Fill nonce buffer */ if (ectx->type == EDNONETYPE) {