trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1144491 - in /trafficserver/traffic/trunk: iocore/hostdb/I_HostDBProcessor.h iocore/net/Connection.cc proxy/InkAPI.cc
Date Fri, 08 Jul 2011 20:26:33 GMT
Author: amc
Date: Fri Jul  8 20:26:33 2011
New Revision: 1144491

URL: http://svn.apache.org/viewvc?rev=1144491&view=rev
Log:
Possible fix for memory corruption.

Modified:
    trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h
    trafficserver/traffic/trunk/iocore/net/Connection.cc
    trafficserver/traffic/trunk/proxy/InkAPI.cc

Modified: trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h?rev=1144491&r1=1144490&r2=1144491&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h (original)
+++ trafficserver/traffic/trunk/iocore/hostdb/I_HostDBProcessor.h Fri Jul  8 20:26:33 2011
@@ -266,7 +266,7 @@ struct HostDBInfo
 
   uint64_t md5_high;
 
-  sockaddr_in6 ip6;
+  sockaddr_in6 ip_addr; // used only by API as storage.
 
   bool failed() { return !ip(); }
   void set_failed() { ip() = 0;  }

Modified: trafficserver/traffic/trunk/iocore/net/Connection.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/Connection.cc?rev=1144491&r1=1144490&r2=1144491&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/Connection.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/Connection.cc Fri Jul  8 20:26:33 2011
@@ -69,7 +69,7 @@ Connection::Connection()
   , is_bound(false)
   , is_connected(false)
 {
-  memset(&sa, 0, sizeof(struct sockaddr_storage));
+  memset(&sa, 0, sizeof(sa));
 }
 
 

Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1144491&r1=1144490&r2=1144491&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Fri Jul  8 20:26:33 2011
@@ -6232,8 +6232,8 @@ TSHostLookupResultAddrGet(TSHostLookupRe
 {
   sdk_assert(sdk_sanity_check_hostlookup_structure(lookup_result) == TS_SUCCESS);
   HostDBInfo* di = reinterpret_cast<HostDBInfo*>(lookup_result);
-  ink_inet_ip4_set(ink_inet_sa_cast(&di->ip6), di->ip());
-  return ink_inet_sa_cast(&di->ip6);
+  ink_inet_ip4_set(&di->ip_addr, di->ip());
+  return ink_inet_sa_cast(&di->ip_addr);
 }
 
 in_addr_t



Mime
View raw message