From: Szymon Janc <szymon.janc@tieto.com>
To: gowtham babu <gowtham.ab@samsung.com>
Cc: linux-bluetooth@vger.kernel.org, d.kasatkin@samsung.com,
bharat.panda@samsung.com, cpgs@samsung.com
Subject: Re: [PATCH 3/3] android/hal-utils.c : Fix null pointer dereference
Date: Thu, 11 Sep 2014 11:41:05 +0200 [thread overview]
Message-ID: <3030038.LEiDkyyyur@uw000953> (raw)
In-Reply-To: <1410352944-16586-1-git-send-email-gowtham.ab@samsung.com>
Hi,
On Wednesday 10 of September 2014 18:12:24 gowtham babu wrote:
> Handles the possible null pointer dereference: bd_addr by checking it against null.
> ---
> android/hal-utils.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/android/hal-utils.c b/android/hal-utils.c
> index ceefefc..64ab5a1 100644
> --- a/android/hal-utils.c
> +++ b/android/hal-utils.c
> @@ -166,11 +166,13 @@ int int2str_findstr(const char *str, const struct int2str m[])
> */
> const char *bt_bdaddr_t2str(const bt_bdaddr_t *bd_addr, char *buf)
> {
> - const uint8_t *p = bd_addr->address;
> + const uint8_t *p;
>
> if (!bd_addr)
> return strcpy(buf, "NULL");
>
> + p = bd_addr->address;
> +
> snprintf(buf, MAX_ADDR_STR_LEN, "%02x:%02x:%02x:%02x:%02x:%02x",
> p[0], p[1], p[2], p[3], p[4], p[5]);
>
This patch looks OK to me, but I have one question before applying it.
Do you really want your name to be visible in git history as it is in this
email ie. without any capital letters?
--
Best regards,
Szymon Janc
next prev parent reply other threads:[~2014-09-11 9:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 12:42 [PATCH 3/3] android/hal-utils.c : Fix null pointer dereference gowtham babu
2014-09-11 9:41 ` Szymon Janc [this message]
2014-09-11 10:12 ` Gowtham Anandha Babu
2014-09-11 10:16 ` Gowtham Anandha Babu
2014-09-11 11:33 ` Luiz Augusto von Dentz
2014-09-11 13:28 ` Gowtham Anandha Babu
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=3030038.LEiDkyyyur@uw000953 \
--to=szymon.janc@tieto.com \
--cc=bharat.panda@samsung.com \
--cc=cpgs@samsung.com \
--cc=d.kasatkin@samsung.com \
--cc=gowtham.ab@samsung.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