Blame SOURCES/1009-cloud-setup-fix-allocating-buffer-for-GetConfigMetad-rh1866395.patch

f25c7b
From e8e245f0ce414bbe9b8ef6c13404b73b12dd34ad Mon Sep 17 00:00:00 2001
f25c7b
From: Thomas Haller <thaller@redhat.com>
f25c7b
Date: Mon, 29 Jun 2020 09:52:18 +0200
f25c7b
Subject: [PATCH 1/1] cloud-setup: fix allocating buffer for
f25c7b
 GetConfigMetadataMac in _get_config_metadata_ready_check()
f25c7b
f25c7b
It's not a severe issue, because the GetConfigMetadataData struct is
f25c7b
larger than GetConfigMetadataMac.
f25c7b
f25c7b
Fixes: 69f048bf0ca3 ('cloud-setup: add tool for automatic IP configuration in cloud')
f25c7b
(cherry picked from commit 460afe6d502f2a8f158739c176302fd7fa072913)
f25c7b
(cherry picked from commit 181fd5c611e070c0563ec2659c8642ffe567e738)
f25c7b
---
f25c7b
 clients/cloud-setup/nmcs-provider-ec2.c | 2 +-
f25c7b
 1 file changed, 1 insertion(+), 1 deletion(-)
f25c7b
f25c7b
diff --git a/clients/cloud-setup/nmcs-provider-ec2.c b/clients/cloud-setup/nmcs-provider-ec2.c
f25c7b
index c8db31f97f67..3b5f6d36a82e 100644
f25c7b
--- a/clients/cloud-setup/nmcs-provider-ec2.c
f25c7b
+++ b/clients/cloud-setup/nmcs-provider-ec2.c
f25c7b
@@ -487,7 +487,7 @@ _get_config_metadata_ready_check (long response_code,
f25c7b
 		if (!response_parsed)
f25c7b
 			response_parsed = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free);
f25c7b
 
f25c7b
-		mac_data = g_malloc (sizeof (GetConfigMetadataData) + 1 + p_start_l);
f25c7b
+		mac_data = g_malloc (sizeof (GetConfigMetadataMac) + 1 + p_start_l);
f25c7b
 		mac_data->iface_idx = iface_idx_counter++;
f25c7b
 		memcpy (mac_data->path, p_start, p_start_l);
f25c7b
 		mac_data->path[p_start_l] = '\0';
f25c7b
-- 
f25c7b
2.26.2
f25c7b