summaryrefslogtreecommitdiffstats
path: root/src/stk.c
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2010-11-22 05:43:01 +0100
committerDenis Kenzior <denkenz@gmail.com>2010-11-23 03:08:51 -0600
commit55e1ca2e1cb2d225f439b6fb2784014e6768481a (patch)
tree1af4b2baedf9702f9252f648ecbc44a80f2f42f3 /src/stk.c
parenta32965de27f4caad7667ae88676442d9f84bdf4b (diff)
downloadofono-55e1ca2e1cb2d225f439b6fb2784014e6768481a.tar.bz2
stk: Handle null Text field
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.
Diffstat (limited to 'src/stk.c')
-rw-r--r--src/stk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stk.c b/src/stk.c
index a58513b2..222d4ba3 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;