[libvirt] [PATCH] 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. --- src/esx/esx_storage_backend_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_backend_iscsi.c index 96b472e..b106c51 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; } -- 2.8.3

On 04/12/2017 10:15 PM, Wang King wrote:
Use MD5_DIGEST_SIZE or VIR_UUID_BUFLEN rather than VIR_UUID_STRING_BUFLEN when compare @uuid with @md5. --- src/esx/esx_storage_backend_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ACK (and will push shortly) John
participants (2)
-
John Ferlan
-
Wang King