about summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-10-29 23:01:58 -0700
committerUlrich Drepper <drepper@redhat.com>2009-10-29 23:01:58 -0700
commit75ded9bcdff960829743aca4a984a4cbf40a3585 (patch)
tree191d0b8beb58ce5621a14a54f3c04445dc3e7665 /resolv
parentbf20990de0c0478cd974717237c5738d036ad8dc (diff)
downloadglibc-75ded9bcdff960829743aca4a984a4cbf40a3585.tar.gz
glibc-75ded9bcdff960829743aca4a984a4cbf40a3585.tar.xz
glibc-75ded9bcdff960829743aca4a984a4cbf40a3585.zip
Initialize local variable in resolver.
When the DNS server doesn't reply at all we possibly tested
an unitialized variable.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_send.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c
index fa48bd98d1..e2bbfcc83f 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -1005,7 +1005,8 @@ send_dg(res_state statp,
 	struct pollfd pfd[1];
 	int ptimeout;
 	struct sockaddr_in6 from;
-	int resplen, n;
+	int resplen = 0;
+	int n;
 
 	/*
 	 * Compute time for the total operation.