All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] src: out of bounds problem in smsutil
@ 2011-02-16 12:04 Jessica Nilsson
  2011-02-16 15:25 ` Denis Kenzior
  0 siblings, 1 reply; 5+ messages in thread
From: Jessica Nilsson @ 2011-02-16 12:04 UTC (permalink / raw)
  To: ofono

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

---

This one was exposed when wgmodem2.5 CBS was run with valgrind.

Best Regards,
Jessica Nilsson

 src/smsutil.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/smsutil.c b/src/smsutil.c
index 5524932..b3a1ba1 100644
--- a/src/smsutil.c
+++ b/src/smsutil.c
@@ -4628,7 +4628,7 @@ char *cbs_topic_ranges_to_string(GSList *ranges)
 	}
 
 	/* Space for ranges, commas and terminator null */
-	ret = g_new(char, len + nelem);
+	ret = g_new0(char, len + nelem + 1);
 
 	len = 0;
 
-- 
1.7.3.5


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

end of thread, other threads:[~2011-02-16 16:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 12:04 [PATCH 1/1] src: out of bounds problem in smsutil Jessica Nilsson
2011-02-16 15:25 ` Denis Kenzior
2011-02-16 15:50   ` Andreas WESTIN
2011-02-16 16:02     ` Denis Kenzior
2011-02-16 16:13       ` Andreas WESTIN

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.