Verified Commit 460afe6d authored by Thomas Haller's avatar Thomas Haller

cloud-setup: fix allocating buffer for GetConfigMetadataMac in _get_config_metadata_ready_check()

It's not a severe issue, because the GetConfigMetadataData struct is
larger than GetConfigMetadataMac.

Fixes: 69f048bf ('cloud-setup: add tool for automatic IP configuration in cloud')
parent 8209095e
......@@ -487,7 +487,7 @@ _get_config_metadata_ready_check (long response_code,
if (!response_parsed)
response_parsed = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free);
mac_data = g_malloc (sizeof (GetConfigMetadataData) + 1 + p_start_l);
mac_data = g_malloc (sizeof (GetConfigMetadataMac) + 1 + p_start_l);
mac_data->iface_idx = iface_idx_counter++;
memcpy (mac_data->path, p_start, p_start_l);
mac_data->path[p_start_l] = '\0';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment