commit 1feae458b96873f36e197e2eadcf34bde003b43e
parent 244b4e3693ebf02d42d2e4e5f996cccaee0658f8
Author: sin <sin@2f30.org>
Date: Fri, 3 May 2019 12:15:19 +0100
Style fixes
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bencrypt.c b/bencrypt.c
@@ -248,8 +248,9 @@ beget(struct bctx *bctx, unsigned char *md, void *buf, size_t *n)
return -1;
}
- /* Decrypt block */
unpacked(ebuf, &ed);
+
+ /* Decrypt block */
if (ed.type == EDNONETYPE) {
dn = ed.size;
if (*n < dn) {
@@ -272,7 +273,7 @@ beget(struct bctx *bctx, unsigned char *md, void *buf, size_t *n)
NULL,
&ebuf[EDSIZE], ed.size,
ebuf, EDSIZE,
- ed.nonce, ectx->key) != 0) {
+ ed.nonce, ectx->key) < 0) {
free(ebuf);
return -1;
}