Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] test-common: Avoid accessing an unitialised variable.
@ 2010-06-21  8:41 Andrzej Zaborowski
  2010-06-21  8:41 ` [PATCH] stkutil: Remove obsolete comment Andrzej Zaborowski
  2010-06-21 21:11 ` [PATCH] test-common: Avoid accessing an unitialised variable Denis Kenzior
  0 siblings, 2 replies; 4+ messages in thread
From: Andrzej Zaborowski @ 2010-06-21  8:41 UTC (permalink / raw)
  To: ofono

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

Fixes a segfault, reported by valrgind as:
[...]
==6300== Use of uninitialised value of size 4
==6300==    at 0x8048B4D: test_invalid (test-common.c:81)
---
 unit/test-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/unit/test-common.c b/unit/test-common.c
index f33f117..baed178 100644
--- a/unit/test-common.c
+++ b/unit/test-common.c
@@ -78,7 +78,7 @@ static void test_invalid()
 
 		ret = parse_ss_control_string(str, &type, &sc,
 						&sia, &sib, &sic, &sid, &dn);
-		if (strlen(sid))
+		if (ret == TRUE && strlen(sid))
 			ret = FALSE;
 
 		g_assert(ret == FALSE);
-- 
1.7.1.86.g0e460.dirty


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

* [PATCH] stkutil: Remove obsolete comment.
  2010-06-21  8:41 [PATCH] test-common: Avoid accessing an unitialised variable Andrzej Zaborowski
@ 2010-06-21  8:41 ` Andrzej Zaborowski
  2010-06-21 21:11   ` Denis Kenzior
  2010-06-21 21:11 ` [PATCH] test-common: Avoid accessing an unitialised variable Denis Kenzior
  1 sibling, 1 reply; 4+ messages in thread
From: Andrzej Zaborowski @ 2010-06-21  8:41 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 642081e..6520c8a 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -4541,9 +4541,6 @@ static gboolean build_dataobj_bcch_channel_list(struct stk_tlv_builder *tlv,
 	unsigned int i, bytes, pos, shift;
 	unsigned char value;
 
-	/* To distinguish between no BCCH Channel List data object and
-	 * an empty object in a sequence of empty and non-empty objects,
-	 * .channels must be non-NULL in objects in sequences.  */
 	if (list->has_list == FALSE)
 		return TRUE;
 
-- 
1.7.1.86.g0e460.dirty


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

* Re: [PATCH] stkutil: Remove obsolete comment.
  2010-06-21  8:41 ` [PATCH] stkutil: Remove obsolete comment Andrzej Zaborowski
@ 2010-06-21 21:11   ` Denis Kenzior
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2010-06-21 21:11 UTC (permalink / raw)
  To: ofono

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

Hi Andrew,

> ---
>  src/stkutil.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis

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

* Re: [PATCH] test-common: Avoid accessing an unitialised variable.
  2010-06-21  8:41 [PATCH] test-common: Avoid accessing an unitialised variable Andrzej Zaborowski
  2010-06-21  8:41 ` [PATCH] stkutil: Remove obsolete comment Andrzej Zaborowski
@ 2010-06-21 21:11 ` Denis Kenzior
  1 sibling, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2010-06-21 21:11 UTC (permalink / raw)
  To: ofono

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

Hi Andrew,

> Fixes a segfault, reported by valrgind as:
> [...]
> ==6300== Use of uninitialised value of size 4
> ==6300==    at 0x8048B4D: test_invalid (test-common.c:81)
> ---
>  unit/test-common.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Good catch.  Patch has been applied.

Regards,
-Denis

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-21  8:41 [PATCH] test-common: Avoid accessing an unitialised variable Andrzej Zaborowski
2010-06-21  8:41 ` [PATCH] stkutil: Remove obsolete comment Andrzej Zaborowski
2010-06-21 21:11   ` Denis Kenzior
2010-06-21 21:11 ` [PATCH] test-common: Avoid accessing an unitialised variable Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox