apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r314841 - /apr/apr/trunk/network_io/unix/sockaddr.c
Date Wed, 12 Oct 2005 10:51:21 GMT
Author: trawick
Date: Wed Oct 12 03:51:14 2005
New Revision: 314841

URL: http://svn.apache.org/viewcvs?rev=314841&view=rev
Log:
getnameinfo() may copy the port field around, so initialize
it to something to prevent unitialized memory reference
warnings with Purify

Modified:
    apr/apr/trunk/network_io/unix/sockaddr.c

Modified: apr/apr/trunk/network_io/unix/sockaddr.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/network_io/unix/sockaddr.c?rev=314841&r1=314840&r2=314841&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/sockaddr.c (original)
+++ apr/apr/trunk/network_io/unix/sockaddr.c Wed Oct 12 03:51:14 2005
@@ -606,6 +606,7 @@
         IN6_IS_ADDR_V4MAPPED(&sockaddr->sa.sin6.sin6_addr)) {
         struct sockaddr_in tmpsa;
         tmpsa.sin_family = AF_INET;
+        tmpsa.sin_port = 0;
         tmpsa.sin_addr.s_addr = ((apr_uint32_t *)sockaddr->ipaddr_ptr)[3];
 #ifdef SIN6_LEN
         tmpsa.sin_len = sizeof(tmpsa);



Mime
View raw message