summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-api.h
diff options
context:
space:
mode:
Diffstat (limited to 'binding/bluetooth-api.h')
-rw-r--r--binding/bluetooth-api.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/binding/bluetooth-api.h b/binding/bluetooth-api.h
index 31a1d76..209f992 100644
--- a/binding/bluetooth-api.h
+++ b/binding/bluetooth-api.h
@@ -92,6 +92,11 @@ static inline gchar *bluez_return_device(const char *path)
if (!basename)
return NULL;
basename++;
+
+ /* be sure it is a bluez path with device */
+ if (strncmp(basename, "dev_", 4))
+ return NULL;
+
/* at least one character */
return *basename ? g_strdup(basename) : NULL;
}