All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stk: Handle null Text field.
@ 2010-11-22  4:43 Andrzej Zaborowski
  2010-11-22  4:43 ` [PATCH] gatchat: make sure to unsubscribe the GAtIO write handler on disconnect Andrzej Zaborowski
  2010-11-23  9:09 ` [PATCH] stk: Handle null Text field Denis Kenzior
  0 siblings, 2 replies; 5+ messages in thread
From: Andrzej Zaborowski @ 2010-11-22  4:43 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-23 23:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-22  4:43 [PATCH] stk: Handle null Text field Andrzej Zaborowski
2010-11-22  4:43 ` [PATCH] gatchat: make sure to unsubscribe the GAtIO write handler on disconnect Andrzej Zaborowski
2010-11-23  9:22   ` Denis Kenzior
2010-11-23 23:39     ` Andrzej Zaborowski
2010-11-23  9:09 ` [PATCH] stk: Handle null Text field Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.