gosthash.c: use memmove in circle_xor8, as input pointers can be equal.

PR: 2858
This commit is contained in:
Andy Polyakov 2012-08-13 16:36:51 +00:00
parent cb726fe8d4
commit 99e59d634a

View File

@ -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];
}