From 349e9eafbb55f632b616f5647e2c8d6a396fbeea Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 21 Mar 2021 18:30:52 +0200 Subject: [PATCH] PASN: Mark pubkey/comeback arguments constant for frame construction These parameters are only copied to the frame, so mark them as constant. Signed-off-by: Jouni Malinen --- src/common/wpa_common.c | 4 ++-- src/common/wpa_common.h | 4 ++-- wpa_supplicant/pasn_supplicant.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index 493da18d7..04461516f 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -3428,8 +3428,8 @@ int wpa_pasn_add_rsne(struct wpabuf *buf, const u8 *pmkid, int akmp, int cipher) */ void wpa_pasn_add_parameter_ie(struct wpabuf *buf, u16 pasn_group, u8 wrapped_data_format, - struct wpabuf *pubkey, bool compressed, - struct wpabuf *comeback, int after) + const struct wpabuf *pubkey, bool compressed, + const struct wpabuf *comeback, int after) { struct pasn_parameter_ie *params; diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h index e51e19483..a1ff89565 100644 --- a/src/common/wpa_common.h +++ b/src/common/wpa_common.h @@ -662,8 +662,8 @@ int wpa_pasn_add_rsne(struct wpabuf *buf, const u8 *pmkid, void wpa_pasn_add_parameter_ie(struct wpabuf *buf, u16 pasn_group, u8 wrapped_data_format, - struct wpabuf *pubkey, bool compressed, - struct wpabuf *comeback, int after); + const struct wpabuf *pubkey, bool compressed, + const struct wpabuf *comeback, int after); int wpa_pasn_add_wrapped_data(struct wpabuf *buf, struct wpabuf *wrapped_data_buf); diff --git a/wpa_supplicant/pasn_supplicant.c b/wpa_supplicant/pasn_supplicant.c index 2d7d819c9..cacba7c26 100644 --- a/wpa_supplicant/pasn_supplicant.c +++ b/wpa_supplicant/pasn_supplicant.c @@ -636,7 +636,7 @@ static u8 wpas_pasn_get_wrapped_data_format(struct wpas_pasn *pasn) static struct wpabuf * wpas_pasn_build_auth_1(struct wpa_supplicant *wpa_s, - struct wpabuf *comeback) + const struct wpabuf *comeback) { struct wpas_pasn *pasn = &wpa_s->pasn; struct wpabuf *buf, *pubkey = NULL, *wrapped_data_buf = NULL;