P2P: Filter input parameters in p2p_serv_disc_external

p2p_ctrl_serv_disc_external() can take only one parameters "0" or "1".

Signed-hostap: Grzegorz Bajorski <grzegorz.bajorski@tieto.com>
This commit is contained in:
Grzegorz Bajorski 2012-03-05 16:26:19 +02:00 committed by Jouni Malinen
parent 25f839c6d9
commit 28ef705d2d

View file

@ -2937,6 +2937,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, static int p2p_ctrl_serv_disc_external(struct wpa_supplicant *wpa_s,
char *cmd) char *cmd)
{ {
if (os_strcmp(cmd, "0") && os_strcmp(cmd, "1"))
return -1;
wpa_s->p2p_sd_over_ctrl_iface = atoi(cmd); wpa_s->p2p_sd_over_ctrl_iface = atoi(cmd);
return 0; return 0;
} }