From d5fec53d23dbdece08ab94e2f02b910bffd9f766 Mon Sep 17 00:00:00 2001 From: Andrzej Zaborowski Date: Mon, 21 Jun 2010 10:41:10 +0200 Subject: [PATCH] test-common: Avoid accessing an unitialised variable. 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 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.7.4