2015-04-02 03:45:14

by Prabhu Chawandi

[permalink] [raw]
Subject: [PATCH] andorid/handsfree.c setting sizeof struct properly for sco_handlers[]

diff --git a/android/handsfree.c b/android/handsfree.c
index 7cdc8b4..e6c4b1b 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -2891,7 +2891,7 @@ failed:

static const struct ipc_handler sco_handlers[] = {
/* SCO_OP_GET_FD */
- { bt_sco_get_fd, false, 0 }
+ { bt_sco_get_fd, false, sizeof(struct sco_cmd_get_fd) }
};

static void bt_sco_unregister(void)


2015-04-03 10:59:27

by Szymon Janc

[permalink] [raw]
Subject: Re: [PATCH] andorid/handsfree.c setting sizeof struct properly for sco_handlers[]

Hi Prabhu,

On Thursday 02 of April 2015 09:15:14 Prabhu Chawandi wrote:

There is typo in commit subject andorid->android

Also please use 'fix' term in commit subject eg
"android/handsfree: Fix invalid size of SCO_OP_GET_FD parameters"


And this patch doesn't apply on top of master branch so you will have to
rebase it before resend.

> diff --git a/android/handsfree.c b/android/handsfree.c
> index 7cdc8b4..e6c4b1b 100644
> --- a/android/handsfree.c
> +++ b/android/handsfree.c
> @@ -2891,7 +2891,7 @@ failed:
>
> static const struct ipc_handler sco_handlers[] = {
> /* SCO_OP_GET_FD */
> - { bt_sco_get_fd, false, 0 }
> + { bt_sco_get_fd, false, sizeof(struct sco_cmd_get_fd) }
> };
>
> static void bt_sco_unregister(void)

--
BR
Szymon Janc