]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: Fix virUUIDGeneratePseudoRandomBytes
authorRyota Ozaki <ozaki.ryota@gmail.com>
Fri, 28 Oct 2011 11:06:20 +0000 (20:06 +0900)
committerEric Blake <eblake@redhat.com>
Fri, 28 Oct 2011 14:54:34 +0000 (08:54 -0600)
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

index 0df3ebcea1e6a6010ee49bd0e1b6aca2aac3529c..823a2b9136202cd3ca9b48da2438ffc82c15e177 100644 (file)
@@ -80,7 +80,7 @@ virUUIDGeneratePseudoRandomBytes(unsigned char *buf,
                                  int buflen)
 {
     while (buflen > 0) {
-        *buf = virRandom(256);
+        *buf++ = virRandom(256);
         buflen--;
     }