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