From: Johan Hedberg <johan.hedberg@gmail.com>
To: Lukasz Pawlik <lucas.pawlik@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Fix problem with invalid read from array
Date: Wed, 6 Oct 2010 15:32:07 +0200 [thread overview]
Message-ID: <20101006133206.GA8696@jh-x301> (raw)
In-Reply-To: <1286369566-1453-1-git-send-email-lucas.pawlik@gmail.com>
Hi Lukasz,
On Wed, Oct 06, 2010, Lukasz Pawlik wrote:
> This patch fix problem with reading data from out of the array range in
> function used to create EIR response.
You'll need to explain in more detail exactly what was wrong with the
old code and how your patch fixes it (and why it is the correct fix).
> - uint8_t data[240];
> + uint8_t data[242];
Why 242? The core spec defines the EIR data as a 240 byte field.
> - uuid128_data[SIZEOF_UUID128 - k])
> + uuid128_data[SIZEOF_UUID128 - 1 - k])
This change looks fine (the index of the last byte is sizeof(uuid128) - 1).
Johan
next prev parent reply other threads:[~2010-10-06 13:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 12:52 [PATCH] Fix problem with invalid read from array Lukasz Pawlik
2010-10-06 13:32 ` Johan Hedberg [this message]
2010-10-06 15:33 ` Lukasz Pawlik
2010-10-08 8:35 ` Lukasz Pawlik
2010-10-09 15:12 ` Johan Hedberg
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=20101006133206.GA8696@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=lucas.pawlik@gmail.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