From a5a030ecc15f2cfdcabc45238832f0b9e41097f7 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Fri, 26 Apr 2013 13:12:52 +0300 Subject: [PATCH] dnsproxy: Conditional jump depends on uninitialized value This came from Daniel when running ConnMan using valgrind ==20635== Conditional jump or move depends on uninitialised value(s) ==20635== at 0x49ECF4: get_name (dnsproxy.c:867) ==20635== by 0x49F3F7: parse_response (dnsproxy.c:1096) ==20635== by 0x49FD40: cache_update (dnsproxy.c:1410) ==20635== by 0x4A0FF3: forward_dns_reply (dnsproxy.c:1803) ==20635== by 0x4A15D9: udp_server_event (dnsproxy.c:1912) ==20635== by 0x3331E47A54: g_main_context_dispatch (gmain.c:2715) ==20635== by 0x3331E47D87: g_main_context_iterate.isra.24 (gmain.c:3290) ==20635== by 0x3331E48181: g_main_loop_run (gmain.c:3484) ==20635== by 0x44B600: main (main.c:670) --- src/dnsproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 8ed34a7..4ad4eb6 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1083,7 +1083,7 @@ static int parse_response(unsigned char *buf, int buflen, * of the alias and cache that. */ unsigned char *end = NULL; - int name_len = 0, output_len; + int name_len = 0, output_len = 0; memset(rsp, 0, sizeof(rsp)); rsp_len = sizeof(rsp) - 1; -- 2.7.4