summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-04-01 12:47:55 +0200
committerThomas Haller <thaller@redhat.com>2020-05-02 17:04:35 +0200
commit2511c64ea4ed144672e80a0ed6f05da3f622c575 (patch)
tree66a06bfd732d34ed7d596b38917dd77b4130206c
parent5b552d2946b65bec91f4c4473034130e0982e548 (diff)
downloadNetworkManager-2511c64ea4ed144672e80a0ed6f05da3f622c575.tar.gz
device/bluetooth: avoid g_ascii_strtoull() to parse capabilities
Avoid g_ascii_strtoull() calling directly. It has subtle issues, which is why we have a wrapper for it. (cherry picked from commit 659ac9cc1299399b34b4677a492c9943458e1b52) (cherry picked from commit 62469c1401dcbd155da5e03bf8cfd37986d6541f) (cherry picked from commit 386ea3ff26fe68105c4f72d1706b06a3a2dc4341)
-rw-r--r--src/devices/bluetooth/nm-bluez-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/bluetooth/nm-bluez-device.c b/src/devices/bluetooth/nm-bluez-device.c
index 377ee478a0..dce9db2061 100644
--- a/src/devices/bluetooth/nm-bluez-device.c
+++ b/src/devices/bluetooth/nm-bluez-device.c
@@ -680,7 +680,7 @@ convert_uuids_to_capabilities (const char **strings)
parts = g_strsplit (*iter, "-", -1);
if (parts && parts[0]) {
- switch (g_ascii_strtoull (parts[0], NULL, 16)) {
+ switch (_nm_utils_ascii_str_to_int64 (parts[0], 16, 0, G_MAXINT, -1)) {
case 0x1103:
capabilities |= NM_BT_CAPABILITY_DUN;
break;