aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/client.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2010-07-29 19:33:49 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2010-08-09 18:06:47 -0400
commit978b5c17073bebb7c4f14345f19d3900856b3fad (patch)
tree51e319cf0d5b0500c8e7d894568404e6b59537ea /attrib/client.c
parenta04de9ef92d435b9773e2f5a15f4ab24038f6ffa (diff)
downloadbluez-978b5c17073bebb7c4f14345f19d3900856b3fad.tar.gz
bluez-978b5c17073bebb7c4f14345f19d3900856b3fad.tar.xz
bluez-978b5c17073bebb7c4f14345f19d3900856b3fad.zip
Fix make use of fixed length string for storage
This way the storage is more stable and more under control.
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/attrib/client.c b/attrib/client.c
index 06aada5f..fb89f62c 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -258,7 +258,7 @@ static char *primary_list_to_string(GSList *primary_list)
bt_free(uuid128);
- snprintf(service, sizeof(service), "%d#%d#%s ", primary->start,
+ snprintf(service, sizeof(service), "%04X#%04X#%s ", primary->start,
primary->end, uuidstr);
services = g_string_append(services, service);
@@ -290,7 +290,7 @@ static GSList *string_to_primary_list(char *gatt_path, const char *str)
prim->path = g_strdup_printf("%s/service%04x", gatt_path,
prim->start);
- ret = sscanf(services[i], "%hd#%hd#%s", &prim->start,
+ ret = sscanf(services[i], "%04hX#%04hX#%s", &prim->start,
&prim->end, (char *) &uuidstr);
if (ret < 3)
continue;