[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-bluetooth
Subject:    Re: [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command
From:       Luiz Augusto von Dentz <luiz.dentz () gmail ! com>
Date:       2016-12-28 9:14:22
Message-ID: CABBYNZKr=3ssvbypvP71kH5UzDfyLKzcgrW=P7sZXTSsgNPPHQ () mail ! gmail ! com
[Download RAW message or body]

Hi Maxime,

On Thu, Dec 22, 2016 at 12:36 PM, Maxime Chevallier
<maxime.chevallier@smile.fr> wrote:
> Fix the interactive "set-security" command in btgatt-client, that would
> always fail due to bad initialization of argv buffer :
>
> [GATT client]# set-security 2
> Usage: set_security <level>
> level: 1-3
> e.g.:
>         set-sec-level 2
> ---
>  tools/btgatt-client.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
> index 40a03b1..afe00aa 100644
> --- a/tools/btgatt-client.c
> +++ b/tools/btgatt-client.c
> @@ -1198,8 +1198,7 @@ static void set_security_usage(void)
>
>  static void cmd_set_security(struct client *cli, char *cmd_str)
>  {
> -       char *argvbuf[1];
> -       char **argv = argvbuf;
> +       char *argv[2];
>         int argc = 0;
>         char *endptr = NULL;
>         int level;
> --
> 2.1.4

Applied, thanks.


-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic