From 55e1ca2e1cb2d225f439b6fb2784014e6768481a Mon Sep 17 00:00:00 2001 From: Andrzej Zaborowski Date: Mon, 22 Nov 2010 05:43:01 +0100 Subject: 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. --- src/stk.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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; -- cgit v1.2.3