summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-04-01 12:47:55 +0200
committerThomas Haller <thaller@redhat.com>2020-04-01 17:12:18 +0200
commit659ac9cc1299399b34b4677a492c9943458e1b52 (patch)
tree7c560fbf8a631099c809e484f326b4ecfde4cb63
parent3930ef194ec37d51eb74aed6e7e2ac403539bbfd (diff)
downloadNetworkManager-659ac9cc1299399b34b4677a492c9943458e1b52.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.
-rw-r--r--src/devices/bluetooth/nm-bluez-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/bluetooth/nm-bluez-manager.c b/src/devices/bluetooth/nm-bluez-manager.c
index c24f1306f8..6ff96c323b 100644
--- a/src/devices/bluetooth/nm-bluez-manager.c
+++ b/src/devices/bluetooth/nm-bluez-manager.c
@@ -221,7 +221,7 @@ convert_uuids_to_capabilities (const char *const*strv)
continue;
s_part1 = g_strndup (str, s - str);
- switch (g_ascii_strtoull (s_part1, NULL, 16)) {
+ switch (_nm_utils_ascii_str_to_int64 (s_part1, 16, 0, G_MAXINT, -1)) {
case 0x1103:
capabilities |= NM_BT_CAPABILITY_DUN;
break;