提交 99e59d63 编写于 作者: A Andy Polyakov

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

PR: 2858
上级 cb726fe8
......@@ -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];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册