linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Archie Pusaka <apusaka@google.com>
To: linux-bluetooth <linux-bluetooth@vger.kernel.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: CrosBT Upstreaming <chromeos-bluetooth-upstreaming@chromium.org>,
	Archie Pusaka <apusaka@chromium.org>,
	Yun-Hao Chung <howardchung@chromium.org>
Subject: Re: [Bluez PATCH] lib/uuid: Fix string to uuid32 conversion
Date: Mon, 24 May 2021 00:24:01 +0800	[thread overview]
Message-ID: <CAJQfnxH8p+pffk49LTMN+JR2UvZwoOPTM_Dg44DCSDz3weOYSQ@mail.gmail.com> (raw)
In-Reply-To: <20210519162046.Bluez.1.Ic61b294b8337c492e9d4eab47d3c5709d8adacbf@changeid>

Hi Luiz,

A friendly ping to review this patch. Thanks!

Cheers,
Archie

On Wed, 19 May 2021 at 16:21, Archie Pusaka <apusaka@google.com> wrote:
>
> From: Archie Pusaka <apusaka@chromium.org>
>
> Use strtoul to prevent 32 bit overflow
>
> Reviewed-by: Yun-Hao Chung <howardchung@chromium.org>
> ---
>
>  lib/uuid.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/uuid.c b/lib/uuid.c
> index a09321dc6e..3d97dc8359 100644
> --- a/lib/uuid.c
> +++ b/lib/uuid.c
> @@ -209,7 +209,7 @@ static int bt_string_to_uuid32(bt_uuid_t *uuid, const char *string)
>         uint32_t u32;
>         char *endptr = NULL;
>
> -       u32 = strtol(string, &endptr, 16);
> +       u32 = strtoul(string, &endptr, 16);
>         if (endptr && *endptr == '\0') {
>                 bt_uuid32_create(uuid, u32);
>                 return 0;
> --
> 2.31.1.751.gd2f1c929bd-goog
>

  parent reply	other threads:[~2021-05-23 16:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  8:21 [Bluez PATCH] lib/uuid: Fix string to uuid32 conversion Archie Pusaka
2021-05-19  8:45 ` [Bluez] " bluez.test.bot
2021-05-23 16:24 ` Archie Pusaka [this message]
2021-05-24 20:18   ` [Bluez PATCH] " Luiz Augusto von Dentz

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=CAJQfnxH8p+pffk49LTMN+JR2UvZwoOPTM_Dg44DCSDz3weOYSQ@mail.gmail.com \
    --to=apusaka@google.com \
    --cc=apusaka@chromium.org \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=howardchung@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@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;
as well as URLs for NNTP newsgroup(s).