From: Christos Tsantilas Date: Wed, 5 Dec 2012 18:09:48 +0000 (+0200) Subject: "SSL server certificate fingerprint ACL type" patch: trunk does not build on amd64... X-Git-Tag: SQUID_3_4_0_1~457 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9b5fbaf62c2dc50a7a1ee52d8423b1ea8a2a3c9;p=thirdparty%2Fsquid.git "SSL server certificate fingerprint ACL type" patch: trunk does not build on amd64-CentOs-icc --- diff --git a/src/acl/CertificateData.cc b/src/acl/CertificateData.cc index fcb1487b45..83b6ac3b1a 100644 --- a/src/acl/CertificateData.cc +++ b/src/acl/CertificateData.cc @@ -42,13 +42,13 @@ ACLCertificateData::ACLCertificateData(Ssl::GETX509ATTRIBUTE *sslStrategy, const char *attrs, bool optionalAttr) : validAttributesStr(attrs), attributeIsOptional(optionalAttr), attribute (NULL), values (), sslAttributeCall (sslStrategy) { if (attrs) { - size_t current; - size_t next = -1; + size_t current = 0; + size_t next = std::string::npos; std::string valid(attrs); do { - current = next + 1; next = valid.find_first_of( "|", current); - validAttributes.push_back(valid.substr( current, next - current )); + validAttributes.push_back(valid.substr( current, (next == std::string::npos ? std::string::npos : next - current))); + current = next + 1; } while (next != std::string::npos); } }