commit 381646ad5b2c3aea7891364f352466fc3ea51e68
parent c3903829beb99b52fe47b86b42ee6cc9088948e2
Author: sin <sin@2f30.org>
Date: Mon, 13 May 2019 23:01:51 +0100
Initialize reserved fields to 0
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
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);
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) {