summaryrefslogtreecommitdiff
path: root/src/libstdcrypto
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-03-27 16:49:32 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-03-27 16:49:32 +0000
commit90767eae542f72b7069a3575bc55944cebc749b6 (patch)
treefcbb21a352eebd44ca379ee1dcfe0431b630346f /src/libstdcrypto
parentef42db56c9ad91d10120861a42e70f8e85cc8870 (diff)
downloadskalibs-90767eae542f72b7069a3575bc55944cebc749b6.tar.xz
Fixed the sha512 bug. rc for 2.3.3.0.v2.3.3.0
Diffstat (limited to 'src/libstdcrypto')
-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) ;