Initialize local variable in resolver.
authorUlrich Drepper <drepper@redhat.com>
Fri, 30 Oct 2009 06:01:58 +0000 (23:01 -0700)
committerUlrich Drepper <drepper@redhat.com>
Fri, 30 Oct 2009 06:01:58 +0000 (23:01 -0700)
When the DNS server doesn't reply at all we possibly tested
an unitialized variable.

ChangeLog
resolv/res_send.c

index 3d86991..c622ad5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-10-29  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #10391]
+       * resolv/res_send.c (send_dg): Initialize resplen.
+
        [BZ #10446]
        * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Match sigevent
        definition to the kernel's.
index fa48bd9..e2bbfcc 100644 (file)
@@ -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.