From: Christos Tsantilas Date: Wed, 25 Mar 2009 09:48:11 +0000 (+0200) Subject: inside the IpAddress::IpAddress(IpAddress *s) constructor, the line X-Git-Tag: SQUID_3_2_0_1~1103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a1f4104444ac18f1e9f0db9ed1b3c00ea92e4e0;p=thirdparty%2Fsquid.git inside the IpAddress::IpAddress(IpAddress *s) constructor, the line "operator=(s)" causing the constructor to recursively call itself, causing segmentation fault. --- diff --git a/src/ip/IpAddress.cc b/src/ip/IpAddress.cc index 90f15e6f56..798bf030fb 100644 --- a/src/ip/IpAddress.cc +++ b/src/ip/IpAddress.cc @@ -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)