From: Szymon Janc <szymon.janc@tieto.com>
To: Marcin Kraglak <marcin.kraglak@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCHv2 01/15] android/tester: Fix condition check
Date: Thu, 25 Sep 2014 11:11:10 +0200 [thread overview]
Message-ID: <8024219.b1VH3u4MZQ@uw000953> (raw)
In-Reply-To: <1411558680-26856-2-git-send-email-marcin.kraglak@tieto.com>
Hi Marcin,
On Wednesday 24 of September 2014 13:37:46 Marcin Kraglak wrote:
> It may cause NULL pointer dereference.
> ---
> android/tester-gatt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/android/tester-gatt.c b/android/tester-gatt.c
> index 42f3733..f30d0eb 100644
> --- a/android/tester-gatt.c
> +++ b/android/tester-gatt.c
> @@ -545,7 +545,7 @@ static void gatt_cid_hook_cb(const void *data, uint16_t len, void *user_data)
> }
> queue_pop_head(t_data->pdus);
> gatt_pdu = queue_pop_head(t_data->pdus);
> - if (!gatt_pdu->data)
> + if (!gatt_pdu)
Shouldn't this be:
if (!gatt_pdu || !gatt_pdu->data)
?
> break;
>
> bthost_send_cid(bthost, cid_data->handle, cid_data->cid,
>
--
Best regards,
Szymon Janc
next prev parent reply other threads:[~2014-09-25 9:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 11:37 [PATCHv2 00/15] android/tester: GATT Client test cases Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 01/15] android/tester: Fix condition check Marcin Kraglak
2014-09-25 9:11 ` Szymon Janc [this message]
2014-09-24 11:37 ` [PATCHv2 02/15] android/tester: Change function names Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 03/15] android/tester: Make local variable static Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 04/15] android/tester: Add support for GATT Client Read/Write callbacks Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 05/15] android/tester: Add GATT Characteristic Read Success Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 06/15] android/tester: Add GATT Characteristic Read Ins. Auth Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 07/15] android/tester: Add GATT Characteristic Read Wrong Params Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 08/15] android/tester: Add GATT Descriptor Read Success Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 09/15] android/tester: Add GATT Descriptor Read Ins. Auth Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 10/15] android/tester: Add GATT Descriptor Read Wrong params Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 11/15] android/tester: Add GATT Characteristic Write Cmd Success Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 12/15] android/tester: Add GATT Characteristic Write Req Success Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 13/15] android/tester: Add GATT Write Characteristic Ins. Auth Marcin Kraglak
2014-09-24 11:37 ` [PATCHv2 14/15] android/gatt: Set proper status of write_data Marcin Kraglak
2014-09-24 11:38 ` [PATCHv2 15/15] android/tester: Add GATT Write Characteristic Wrong params Marcin Kraglak
2014-09-25 9:32 ` [PATCHv2 00/15] android/tester: GATT Client test cases Szymon Janc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8024219.b1VH3u4MZQ@uw000953 \
--to=szymon.janc@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcin.kraglak@tieto.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox