Re: [PATCH] android/client: Fix segfault (invalid argv) for gatt scan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Grzegorz,

On Friday 14 of March 2014 13:46:06 Grzegorz Kolodziejczyk wrote:
> This patch fix segfault driven by lack of 4 element in avrg array.
> If user put only two arguments, reading of lacking (auto set to start=1)
> third argument, will trigger segfault.
> ---
>  android/client/if-gatt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
> index e8837ff..17a491e 100644
> --- a/android/client/if-gatt.c
> +++ b/android/client/if-gatt.c
> @@ -854,7 +854,7 @@ static void scan_p(int argc, const char **argv)
>  	VERIFY_CLIENT_IF(2, client_if);
>  
>  	/* start */
> -	if (argc >= 3)
> +	if (argc >= 4)
>  		start = atoi(argv[3]);
>  
>  	EXEC(if_gatt->client->scan, client_if, start);
> 

Pushed, thanks.

-- 
Best regards, 
Szymon Janc
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux