Add a NULL check in dbus_apply_text_attributes because in some places
(like DisplayText handler) we call it without checking and we just check
the return value once.
---
 src/stk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/stk.c b/src/stk.c
index 18beee6..291d7d2 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -303,6 +303,9 @@ static char *dbus_apply_text_attributes(const char *text,
        const uint8_t *j = attr->attributes;
        const uint8_t *end = j + attr->len;
 
+       if (!text)
+               return NULL;
+
        if (attr->len & 3)
                return NULL;
 
-- 
1.7.1.86.g0e460.dirty

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to