This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] powerpc: Fix unitialized variable
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 10 Dec 2014 17:10:36 -0200
- Subject: [PATCH] powerpc: Fix unitialized variable
- Authentication-results: sourceware.org; auth=none
The 'resolv/res_send.c' build with _STRING_ARCH_unaligned not defined
may utilize the local resplen uninitialized. This patch sets it to 0.
Tested on powerpc64 and powercp32. Along with the e_lgammal_r patch,
it fixes the powerpc warning build with werror.
--
* resolv/res_send.c (send_vc): Fix unitialized variable.
--
diff --git a/resolv/res_send.c b/resolv/res_send.c
index af42b8a..c1e0a85 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -668,7 +668,7 @@ send_vc(res_state statp,
// int anssiz = *anssizp;
HEADER *anhp = (HEADER *) ans;
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
- int truncating, connreset, resplen, n;
+ int truncating, connreset, resplen = 0, n;
struct iovec iov[4];
u_short len;
u_short len2;