projects
/
platform
/
upstream
/
bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76f5450
)
lib/uuid: Fix string to uuid32 conversion
author
Archie Pusaka
<apusaka@chromium.org>
Wed, 19 May 2021 08:21:14 +0000
(16:21 +0800)
committer
Ayush Garg
<ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000
(19:08 +0530)
Use strtoul to prevent 32 bit overflow
Reviewed-by: Yun-Hao Chung <howardchung@chromium.org>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
lib/uuid.c
patch
|
blob
|
history
diff --git
a/lib/uuid.c
b/lib/uuid.c
index
a09321d
..
3d97dc8
100755
(executable)
--- 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 = strto
u
l(string, &endptr, 16);
if (endptr && *endptr == '\0') {
bt_uuid32_create(uuid, u32);
return 0;