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.

(cherry picked from commit 77cc51a4820e27c42636c7072724d5eac73ead53)
This commit is contained in:
Wang King 2017-04-13 10:15:45 +08:00 committed by Cole Robinson
parent 2c59352638
commit e0af3fd525

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;
}