From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH hcidump] hci: Fix EIR data parsing
Date: Sat, 28 Jul 2012 20:42:26 -0300 [thread overview]
Message-ID: <20120728234226.GA16534@echo> (raw)
In-Reply-To: <1343514013-8942-1-git-send-email-andrzej.kaczmarek@tieto.com>
Hi Andrzej,
On 00:20 Sun 29 Jul, Andrzej Kaczmarek wrote:
> Data passed to ext_inquiry_data_dump are expected to start with length
> octet which was consumed by get_u8.
Good catch.
> ---
> parser/hci.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/parser/hci.c b/parser/hci.c
> index 742a1b5..adcdaf7 100644
> --- a/parser/hci.c
> +++ b/parser/hci.c
> @@ -831,16 +831,19 @@ static inline void ext_inquiry_response_dump(int level, struct frame *frm)
> {
> void *ptr = frm->ptr;
> uint32_t len = frm->len;
> + uint8_t *data_ptr;
Just a nitpick, I would only change 'data_ptr' to 'data', to make it more
consistent with the parameters names that ext_inquiry_data_dump() expects.
> uint8_t length;
>
> + data_ptr = frm->ptr;
> length = get_u8(frm);
>
> while (length > 0) {
> - ext_inquiry_data_dump(level, frm, frm->ptr);
> + ext_inquiry_data_dump(level, frm, data_ptr);
>
> frm->ptr += length;
> frm->len -= length;
>
> + data_ptr = frm->ptr;
> length = get_u8(frm);
> }
>
> --
> 1.7.10
>
> --
> 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
Cheers,
--
Vinicius
prev parent reply other threads:[~2012-07-28 23:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-28 22:20 [PATCH hcidump] hci: Fix EIR data parsing Andrzej Kaczmarek
2012-07-28 23:42 ` Vinicius Costa Gomes [this message]
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=20120728234226.GA16534@echo \
--to=vinicius.gomes@openbossa.org \
--cc=andrzej.kaczmarek@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).