summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/gost/gostr341194.c4
-rw-r--r--src/lib/libssl/src/crypto/gost/gostr341194.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/gost/gostr341194.c b/src/lib/libcrypto/gost/gostr341194.c
index 34ca504bb2..32c166aefa 100644
--- a/src/lib/libcrypto/gost/gostr341194.c
+++ b/src/lib/libcrypto/gost/gostr341194.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gostr341194.c,v 1.3 2014/12/07 16:33:51 jsing Exp $ */ 1/* $OpenBSD: gostr341194.c,v 1.4 2015/07/15 17:13:17 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> 3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
4 * Copyright (c) 2005-2006 Cryptocom LTD 4 * Copyright (c) 2005-2006 Cryptocom LTD
@@ -238,7 +238,7 @@ GOSTR341194_Final(unsigned char *md, GOSTR341194_CTX * c)
238 unsigned char T[32]; 238 unsigned char T[32];
239 239
240 if (c->num > 0) { 240 if (c->num > 0) {
241 memset(p + c->num, 0, 32); 241 memset(p + c->num, 0, 32 - c->num);
242 hash_step(c, c->H, p); 242 hash_step(c, c->H, p);
243 add_blocks(32, c->S, p); 243 add_blocks(32, c->S, p);
244 } 244 }
diff --git a/src/lib/libssl/src/crypto/gost/gostr341194.c b/src/lib/libssl/src/crypto/gost/gostr341194.c
index 34ca504bb2..32c166aefa 100644
--- a/src/lib/libssl/src/crypto/gost/gostr341194.c
+++ b/src/lib/libssl/src/crypto/gost/gostr341194.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gostr341194.c,v 1.3 2014/12/07 16:33:51 jsing Exp $ */ 1/* $OpenBSD: gostr341194.c,v 1.4 2015/07/15 17:13:17 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> 3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
4 * Copyright (c) 2005-2006 Cryptocom LTD 4 * Copyright (c) 2005-2006 Cryptocom LTD
@@ -238,7 +238,7 @@ GOSTR341194_Final(unsigned char *md, GOSTR341194_CTX * c)
238 unsigned char T[32]; 238 unsigned char T[32];
239 239
240 if (c->num > 0) { 240 if (c->num > 0) {
241 memset(p + c->num, 0, 32); 241 memset(p + c->num, 0, 32 - c->num);
242 hash_step(c, c->H, p); 242 hash_step(c, c->H, p);
243 add_blocks(32, c->S, p); 243 add_blocks(32, c->S, p);
244 } 244 }