[PATCH] powerpc: Fix unitialized variable
Adhemerval Zanella
azanella@linux.vnet.ibm.com
Wed Dec 10 19:10:00 GMT 2014
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;
More information about the Libc-alpha
mailing list