[PATCH] Filter input parameters in p2p_serv_disc_external
Grzegorz Bajorski
grzegorz.bajorski
Fri Mar 2 02:37:22 PST 2012
Hi
p2p_ctrl_serv_disc_external() can take only one parameters "0" or "1".
Change-Id: I999c575024bdf93736b56d0c7d5f3acc5e32791a
Signed-hostap: Grzegorz Bajorski <grzegorz.bajorski at tieto.com>
---
wpa_supplicant/ctrl_iface.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index ac4009b..3c19421 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2673,6 +2673,8 @@ static int p2p_ctrl_serv_disc_resp(struct
wpa_supplicant *wpa_s, char *cmd)
static int p2p_ctrl_serv_disc_external(struct wpa_supplicant *wpa_s,
char *cmd)
{
+ if (os_strcmp(cmd, "0") && os_strcmp(cmd, "1"))
+ return -1;
wpa_s->p2p_sd_over_ctrl_iface = atoi(cmd);
return 0;
}
--
1.7.0.4
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Attached Message Part
Url: http://lists.shmoo.com/pipermail/hostap/attachments/20120302/baa56fa0/attachment.txt
More information about the Hostap
mailing list