]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Correct size of context
authorDmitry Belyavskiy <beldmit@gmail.com>
Sun, 6 Sep 2015 17:45:33 +0000 (20:45 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Sun, 6 Sep 2015 17:45:33 +0000 (20:45 +0300)
gost_md2012.c

index 092de2653a86a1064d0f6670d02cecf251c84269..08f3724fb3bc510e396d86f4a6dba7c3282ef309 100644 (file)
@@ -83,7 +83,7 @@ static int gost_digest_final(EVP_MD_CTX *ctx, unsigned char *md)
 static int gost_digest_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from)
 {
     if (to->md_data && from->md_data)
-        memcpy(to->md_data, from->md_data, sizeof(*(from->md_data)));
+        memcpy(to->md_data, from->md_data, sizeof(gost2012_hash_ctx));
 
     return 1;
 }