]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
inside the IpAddress::IpAddress(IpAddress *s) constructor, the line
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 25 Mar 2009 09:48:11 +0000 (11:48 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 25 Mar 2009 09:48:11 +0000 (11:48 +0200)
"operator=(s)" causing the constructor to recursively call itself,
causing segmentation fault.

src/ip/IpAddress.cc

index 90f15e6f56294436f4799b451c652c47adaa4d3c..798bf030fb9286019f008b646a5711f6125e4a97 100644 (file)
@@ -646,7 +646,8 @@ IpAddress::IpAddress(const IpAddress &s)
 IpAddress::IpAddress(IpAddress *s)
 {
     SetEmpty();
-    operator=(s);
+    if (s)
+       memcpy(this, s, sizeof(IpAddress));
 }
 
 IpAddress::IpAddress(const struct hostent &s)