'serial' could be NULL in some case. So it need to add check before
doing string operation.
---
plugins/udev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/plugins/udev.c b/plugins/udev.c
index 84399de..6720a0c 100644
--- a/plugins/udev.c
+++ b/plugins/udev.c
@@ -86,7 +86,7 @@ static const char *get_serial(struct udev_device *udev_device)
entry = udev_list_entry_get_next(entry);
}
- if (strpbrk(serial, ".-_?*") != NULL)
+ if (serial && strpbrk(serial, ".-_?*") != NULL)
return NULL;
return serial;
--
1.7.0.4
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono