esx: Fix incorrect memory compare size in esxStoragePoolLookupByUUID

Use MD5_DIGEST_SIZE or VIR_UUID_BUFLEN rather than VIR_UUID_STRING_BUFLEN
when compare @uuid with @md5.
This commit is contained in:
Wang King 2017-04-13 10:15:45 +08:00 committed by John Ferlan
parent 05b3846caf
commit 77cc51a482

View File

@ -220,7 +220,7 @@ esxStoragePoolLookupByUUID(virConnectPtr conn,
target; target = target->_next) {
md5_buffer(target->iScsiName, strlen(target->iScsiName), md5);
if (memcmp(uuid, md5, VIR_UUID_STRING_BUFLEN) == 0)
if (memcmp(uuid, md5, VIR_UUID_BUFLEN) == 0)
break;
}