From: Ryota Ozaki Date: Fri, 28 Oct 2011 11:06:20 +0000 (+0900) Subject: util: Fix virUUIDGeneratePseudoRandomBytes X-Git-Tag: v0.9.7-rc1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=884b98add51e8d9bb804e3c049f60d4659934535;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/util/uuid.c b/src/util/uuid.c index 0df3ebcea1..823a2b9136 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--; }