[libvirt] [PATCH] util: Fix virUUIDGeneratePseudoRandomBytes
Ryota Ozaki
ozaki.ryota at gmail.com
Fri Oct 28 11:06:20 UTC 2011
It forgets to move a pointer to a buffer for UUID and as a result
fills only the first byte of the buffer.
---
src/util/uuid.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/util/uuid.c b/src/util/uuid.c
index 0df3ebc..823a2b9 100644
--- a/src/util/uuid.c
+++ b/src/util/uuid.c
@@ -80,7 +80,7 @@ virUUIDGeneratePseudoRandomBytes(unsigned char *buf,
int buflen)
{
while (buflen > 0) {
- *buf = virRandom(256);
+ *buf++ = virRandom(256);
buflen--;
}
--
1.7.4.1
More information about the libvir-list
mailing list