apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r320734 - /apr/apr/branches/0.9.x/network_io/unix/sockaddr.c
Date Thu, 13 Oct 2005 11:11:04 GMT
Author: trawick
Date: Thu Oct 13 04:11:02 2005
New Revision: 320734

URL: http://svn.apache.org/viewcvs?rev=320734&view=rev
Log:
merge from trunk:

getnameinfo() may copy the port field around, so initialize
it to something to prevent unitialized memory reference
warnings with Purify

Modified:
    apr/apr/branches/0.9.x/network_io/unix/sockaddr.c

Modified: apr/apr/branches/0.9.x/network_io/unix/sockaddr.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/network_io/unix/sockaddr.c?rev=320734&r1=320733&r2=320734&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/network_io/unix/sockaddr.c (original)
+++ apr/apr/branches/0.9.x/network_io/unix/sockaddr.c Thu Oct 13 04:11:02 2005
@@ -612,6 +612,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