This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] powerpc: Fix unitialized variable


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]