[PATCH] wpa_supplicant: Add bss_flush command to invalidate scan results
Vitaly Wool
vitalywool
Sat Aug 25 00:36:35 PDT 2012
Hi Dmitry,
On Fri, Aug 24, 2012 at 8:14 PM, Dmitry Shmidt <dimitrysh at google.com> wrote:
> Change-Id: I1a6ebc4fe53e16909ac44e2d04a6b651993dae91
> Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
> ---
> wpa_supplicant/ctrl_iface.c | 16 ++++++++++++++++
> wpa_supplicant/wpa_cli.c | 20 ++++++++++++++++++++
> 2 files changed, 36 insertions(+), 0 deletions(-)
>
> diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
> index 5de4f7b..ec61b84 100644
> --- a/wpa_supplicant/ctrl_iface.c
> +++ b/wpa_supplicant/ctrl_iface.c
> @@ -2884,6 +2884,19 @@ static int
> wpa_supplicant_ctrl_iface_bss_expire_count(
> }
>
>
> +static int wpa_supplicant_ctrl_iface_bss_flush(
> + struct wpa_supplicant *wpa_s, char *cmd)
> +{
> + int flush_age = atoi(cmd);
>
This is unsafe, e. g. if cmd is "foo", atoi will return -1. Do you really
want to call flush_by_age with age -1 in this case?
Thanks,
Vitaly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20120825/42da79e4/attachment.htm
More information about the Hostap
mailing list