From: Andy Polyakov Date: Mon, 13 Aug 2012 16:36:51 +0000 (+0000) Subject: gosthash.c: use memmove in circle_xor8, as input pointers can be equal. X-Git-Tag: master-pre-reformat~1679 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99e59d634a16502106bb926699c49c9703ab8981;p=openssl gosthash.c: use memmove in circle_xor8, as input pointers can be equal. PR: 2858 --- 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]; }