From: Jouni Malinen Date: Sun, 23 Feb 2025 09:56:16 +0000 (+0200) Subject: P2P: Initialize new_ssid explicitly to make this easier for analyzers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fab6e654666107326401ab6db4efddfff42e5419;p=thirdparty%2Fhostap.git P2P: Initialize new_ssid explicitly to make this easier for analyzers new_ssid_len == 0 was used to skip reference to new_ssid in p2p_build_invitation_resp(). This was too complex for some static analyzers to notice, so initialize new_ssid as well to avoid false reports. Signed-off-by: Jouni Malinen --- diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c index 26f7cae9b..6d112ee87 100644 --- a/src/p2p/p2p_invitation.c +++ b/src/p2p/p2p_invitation.c @@ -210,7 +210,7 @@ struct wpabuf * p2p_process_invitation_req(struct p2p_data *p2p, const u8 *sa, u8 group_bssid[ETH_ALEN], *bssid; int op_freq = 0; u8 reg_class = 0, channel = 0; - const u8 *new_ssid; + const u8 *new_ssid = NULL; size_t new_ssid_len = 0; struct p2p_channels all_channels, intersection, *channels = NULL; int persistent;