From patchwork Fri Mar 2 10:37:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grzegorz Bajorski X-Patchwork-Id: 144206 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 71998B6EEC for ; Fri, 2 Mar 2012 21:38:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id DF77B9C208; Fri, 2 Mar 2012 05:38:30 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vb1oaYD3FDVt; Fri, 2 Mar 2012 05:38:30 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id BD6429D210; Fri, 2 Mar 2012 05:38:25 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 09DB89D210 for ; Fri, 2 Mar 2012 05:38:24 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U0mQBgFoGKgB for ; Fri, 2 Mar 2012 05:38:18 -0500 (EST) Received: from ebb06.tieto.com (ebb06.tieto.com [131.207.168.38]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "ebb06.tieto.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 94C469C208 for ; Fri, 2 Mar 2012 05:38:18 -0500 (EST) X-AuditID: 83cfa826-b7b98ae0000044db-b2-4f50a318c40f Received: from FIVLA-EXHUB02.eu.tieto.com ( [131.207.136.42]) by ebb06.tieto.com (SMTP Mailer) with SMTP id DA.80.17627.813A05F4; Fri, 2 Mar 2012 12:38:16 +0200 (EET) Received: from [10.28.23.76] (10.28.23.76) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.159.2; Fri, 2 Mar 2012 12:38:15 +0200 Message-ID: <4F50A2E2.6090006@tieto.com> Date: Fri, 2 Mar 2012 11:37:22 +0100 From: Grzegorz Bajorski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: Subject: [PATCH] Filter input parameters in p2p_serv_disc_external X-Brightmail-Tracker: AAAAAA== X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Hi p2p_ctrl_serv_disc_external() can take only one parameters "0" or "1". Change-Id: I999c575024bdf93736b56d0c7d5f3acc5e32791a Signed-hostap: Grzegorz Bajorski --- 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;