diff options
author | Andy Polyakov <appro@openssl.org> | 2012-08-13 16:36:51 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2012-08-13 16:36:51 +0000 |
commit | 99e59d634a16502106bb926699c49c9703ab8981 (patch) | |
tree | df8124691b9d4b7f1e28d4d9689dd003f8d2a1fd /engines | |
parent | cb726fe8d46a1ae7cb9bc286980f73e7e6a9f6f7 (diff) |
gosthash.c: use memmove in circle_xor8, as input pointers can be equal.
PR: 2858
Diffstat (limited to 'engines')
-rw-r--r-- | engines/ccgost/gosthash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/ccgost/gosthash.c b/engines/ccgost/gosthash.c index a5c0662ffc..2a458b92ba 100644 --- a/engines/ccgost/gosthash.c +++ b/engines/ccgost/gosthash.c @@ -42,8 +42,8 @@ static void circle_xor8 (const byte *w, byte *k) byte buf[8]; int i; memcpy(buf,w,8); - memcpy(k,w+8,24); - for(i=0;i<8;i++) + memmove(k,w+8,24); + for(i=0;i<8;i++) k[i+24]=buf[i]^k[i]; } |