From: Wang King Date: Thu, 13 Apr 2017 02:15:45 +0000 (+0800) Subject: esx: Fix incorrect memory compare size in esxStoragePoolLookupByUUID X-Git-Tag: v3.3.0-rc1~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77cc51a4820e27c42636c7072724d5eac73ead53;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_backend_iscsi.c index 96b472ee07..b106c517e8 100644 --- a/src/esx/esx_storage_backend_iscsi.c +++ b/src/esx/esx_storage_backend_iscsi.c @@ -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; }