summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstdcrypto/sha512_final.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstdcrypto/sha512_final.c b/src/libstdcrypto/sha512_final.c
index 968671b..62a6187 100644
--- a/src/libstdcrypto/sha512_final.c
+++ b/src/libstdcrypto/sha512_final.c
@@ -17,7 +17,7 @@ void sha512_final (SHA512Schedule *ctx, char *digest)
sha512_transform(ctx, ctx->buf) ;
pad = 0 ;
}
- byte_zero(ctx + pad, 120 - pad) ;
+ byte_zero(ctx->buf + pad, 120 - pad) ;
uint64_pack_big((char *)ctx->buf + 120, ctx->len << 3) ;
sha512_transform(ctx, ctx->buf) ;