提交 884b98ad 编写于 作者: R Ryota Ozaki 提交者: Eric Blake

util: Fix virUUIDGeneratePseudoRandomBytes

It forgets to move a pointer to a buffer for UUID and as a result
fills only the first byte of the buffer.
上级 d442599a
...@@ -80,7 +80,7 @@ virUUIDGeneratePseudoRandomBytes(unsigned char *buf, ...@@ -80,7 +80,7 @@ virUUIDGeneratePseudoRandomBytes(unsigned char *buf,
int buflen) int buflen)
{ {
while (buflen > 0) { while (buflen > 0) {
*buf = virRandom(256); *buf++ = virRandom(256);
buflen--; buflen--;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册