diff options
author | Archie Pusaka <apusaka@chromium.org> | 2021-05-19 16:21:14 +0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-05-24 13:14:25 -0700 |
commit | 6052a8e0582d4c0e2b53887f75a0ee7447b4fcea (patch) | |
tree | 0844cf4e7abdfed783bef5a528266f9c8942ca69 /lib | |
parent | 2501575a73d0c434ffa02d62d4d1f9c0584bf01d (diff) | |
download | bluez-6052a8e0582d4c0e2b53887f75a0ee7447b4fcea.tar.gz |
lib/uuid: Fix string to uuid32 conversion
Use strtoul to prevent 32 bit overflow
Reviewed-by: Yun-Hao Chung <howardchung@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uuid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uuid.c b/lib/uuid.c index a09321dc6..3d97dc835 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; |