Merge ~ahasenack/ubuntu/+source/squid:cosmic-squid-4.2-merge into ubuntu/+source/squid:ubuntu/devel

Proposed by Andreas Hasenack
Status: Superseded
Proposed branch: ~ahasenack/ubuntu/+source/squid:cosmic-squid-4.2-merge
Merge into: ubuntu/+source/squid:ubuntu/devel
Diff against target: 11733 lines (+1722/-1627) (has conflicts)
214 files modified
ChangeLog (+30/-0)
RELEASENOTES.html (+3/-3)
configure (+10/-10)
configure.ac (+1/-1)
debian/changelog (+78/-0)
debian/control (+3/-3)
debian/patches/0003-installed-binary-for-debian-ci.patch (+19/-0)
debian/patches/0004-upstream-pr264.patch (+28/-0)
debian/patches/series (+7/-0)
debian/rules (+10/-0)
debian/tests/control (+1/-1)
dev/null (+0/-41)
doc/release-notes/release-4.html (+3/-3)
errors/af/ERR_AGENT_CONFIGURE (+3/-3)
errors/af/ERR_AGENT_WPAD (+3/-3)
errors/ar/ERR_AGENT_CONFIGURE (+3/-3)
errors/ar/ERR_AGENT_WPAD (+3/-3)
errors/az/ERR_AGENT_CONFIGURE (+3/-3)
errors/az/ERR_AGENT_WPAD (+3/-3)
errors/bg/ERR_AGENT_CONFIGURE (+3/-3)
errors/bg/ERR_AGENT_WPAD (+3/-3)
errors/ca/ERR_AGENT_CONFIGURE (+3/-3)
errors/ca/ERR_AGENT_WPAD (+3/-3)
errors/cs/ERR_AGENT_CONFIGURE (+3/-3)
errors/cs/ERR_AGENT_WPAD (+3/-3)
errors/da/ERR_AGENT_CONFIGURE (+3/-3)
errors/da/ERR_AGENT_WPAD (+3/-3)
errors/de/ERR_AGENT_CONFIGURE (+3/-3)
errors/de/ERR_AGENT_WPAD (+3/-3)
errors/el/ERR_AGENT_CONFIGURE (+3/-3)
errors/el/ERR_AGENT_WPAD (+3/-3)
errors/en/ERR_AGENT_CONFIGURE (+3/-3)
errors/en/ERR_AGENT_WPAD (+3/-3)
errors/es/ERR_AGENT_CONFIGURE (+3/-3)
errors/es/ERR_AGENT_WPAD (+3/-3)
errors/et/ERR_AGENT_CONFIGURE (+3/-3)
errors/et/ERR_AGENT_WPAD (+3/-3)
errors/fa/ERR_AGENT_CONFIGURE (+3/-3)
errors/fa/ERR_AGENT_WPAD (+3/-3)
errors/fi/ERR_AGENT_CONFIGURE (+3/-3)
errors/fi/ERR_AGENT_WPAD (+3/-3)
errors/fr/ERR_AGENT_CONFIGURE (+3/-3)
errors/fr/ERR_AGENT_WPAD (+3/-3)
errors/he/ERR_AGENT_CONFIGURE (+3/-3)
errors/he/ERR_AGENT_WPAD (+3/-3)
errors/hu/ERR_AGENT_CONFIGURE (+3/-3)
errors/hu/ERR_AGENT_WPAD (+3/-3)
errors/hy/ERR_AGENT_CONFIGURE (+3/-3)
errors/hy/ERR_AGENT_WPAD (+3/-3)
errors/id/ERR_AGENT_CONFIGURE (+3/-3)
errors/id/ERR_AGENT_WPAD (+3/-3)
errors/it/ERR_AGENT_CONFIGURE (+3/-3)
errors/it/ERR_AGENT_WPAD (+3/-3)
errors/ja/ERR_AGENT_CONFIGURE (+3/-3)
errors/ja/ERR_AGENT_WPAD (+3/-3)
errors/ka/ERR_AGENT_CONFIGURE (+3/-3)
errors/ka/ERR_AGENT_WPAD (+3/-3)
errors/ko/ERR_AGENT_CONFIGURE (+3/-3)
errors/ko/ERR_AGENT_WPAD (+3/-3)
errors/lt/ERR_AGENT_CONFIGURE (+3/-3)
errors/lt/ERR_AGENT_WPAD (+3/-3)
errors/lv/ERR_AGENT_CONFIGURE (+3/-3)
errors/lv/ERR_AGENT_WPAD (+3/-3)
errors/ms/ERR_AGENT_CONFIGURE (+3/-3)
errors/ms/ERR_AGENT_WPAD (+3/-3)
errors/nl/ERR_AGENT_CONFIGURE (+3/-3)
errors/nl/ERR_AGENT_WPAD (+3/-3)
errors/oc/ERR_AGENT_CONFIGURE (+3/-3)
errors/oc/ERR_AGENT_WPAD (+3/-3)
errors/pl/ERR_AGENT_CONFIGURE (+3/-3)
errors/pl/ERR_AGENT_WPAD (+3/-3)
errors/pt-br/ERR_AGENT_CONFIGURE (+3/-3)
errors/pt-br/ERR_AGENT_WPAD (+3/-3)
errors/pt/ERR_AGENT_CONFIGURE (+3/-3)
errors/pt/ERR_AGENT_WPAD (+3/-3)
errors/ro/ERR_AGENT_CONFIGURE (+3/-3)
errors/ro/ERR_AGENT_WPAD (+3/-3)
errors/ru/ERR_AGENT_CONFIGURE (+3/-3)
errors/ru/ERR_AGENT_WPAD (+3/-3)
errors/sk/ERR_AGENT_CONFIGURE (+3/-3)
errors/sk/ERR_AGENT_WPAD (+3/-3)
errors/sl/ERR_AGENT_CONFIGURE (+3/-3)
errors/sl/ERR_AGENT_WPAD (+3/-3)
errors/sr-cyrl/ERR_AGENT_CONFIGURE (+3/-3)
errors/sr-cyrl/ERR_AGENT_WPAD (+3/-3)
errors/sr-latn/ERR_AGENT_CONFIGURE (+3/-3)
errors/sr-latn/ERR_AGENT_WPAD (+3/-3)
errors/sv/ERR_AGENT_CONFIGURE (+3/-3)
errors/sv/ERR_AGENT_WPAD (+3/-3)
errors/th/ERR_AGENT_CONFIGURE (+3/-3)
errors/th/ERR_AGENT_WPAD (+3/-3)
errors/tr/ERR_AGENT_CONFIGURE (+3/-3)
errors/tr/ERR_AGENT_WPAD (+3/-3)
errors/uk/ERR_AGENT_CONFIGURE (+3/-3)
errors/uk/ERR_AGENT_WPAD (+3/-3)
errors/uz/ERR_AGENT_CONFIGURE (+3/-3)
errors/uz/ERR_AGENT_WPAD (+3/-3)
errors/vi/ERR_AGENT_CONFIGURE (+3/-3)
errors/vi/ERR_AGENT_WPAD (+3/-3)
errors/zh-hans/ERR_AGENT_CONFIGURE (+3/-3)
errors/zh-hans/ERR_AGENT_WPAD (+3/-3)
errors/zh-hant/ERR_AGENT_CONFIGURE (+3/-3)
errors/zh-hant/ERR_AGENT_WPAD (+3/-3)
include/version.h (+1/-1)
src/AccessLogEntry.cc (+12/-0)
src/AccessLogEntry.h (+18/-0)
src/CacheManager.h (+0/-3)
src/Downloader.cc (+1/-3)
src/HttpMsg.h (+1/-1)
src/HttpReply.cc (+17/-8)
src/HttpReply.h (+6/-2)
src/HttpRequest.cc (+7/-1)
src/HttpRequest.h (+4/-0)
src/Makefile.am (+0/-4)
src/Makefile.in (+20/-27)
src/MemObject.cc (+4/-16)
src/MemObject.h (+19/-25)
src/MemStore.cc (+1/-1)
src/PeerDigest.h (+20/-17)
src/SquidConfig.h (+8/-4)
src/StatCounters.h (+61/-63)
src/StatHist.h (+14/-32)
src/acl/BoolOps.cc (+2/-1)
src/acl/FilledChecklist.cc (+2/-2)
src/acl/external/SQL_session/ext_sql_session_acl.8 (+1/-1)
src/acl/external/delayer/ext_delayer_acl.8 (+1/-1)
src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8 (+1/-1)
src/anyp/TrafficMode.h (+5/-9)
src/anyp/Uri.cc (+62/-9)
src/anyp/Uri.h (+7/-1)
src/auth/basic/DB/basic_db_auth.8 (+1/-1)
src/auth/basic/POP3/basic_pop3_auth.8 (+1/-1)
src/cache_cf.cc (+11/-9)
src/cf.data.pre (+143/-61)
src/client_side.cc (+10/-79)
src/client_side.h (+0/-2)
src/client_side_reply.cc (+6/-8)
src/client_side_request.cc (+104/-38)
src/client_side_request.h (+45/-2)
src/clients/FtpGateway.cc (+66/-85)
src/comm/Loops.h (+6/-1)
src/comm/ModDevPoll.cc (+0/-11)
src/comm/ModEpoll.cc (+0/-8)
src/comm/ModKqueue.cc (+1/-13)
src/comm/ModPoll.cc (+1/-6)
src/comm/ModSelect.cc (+1/-6)
src/comm/ModSelectWin32.cc (+1/-6)
src/comm/TcpAcceptor.cc (+1/-0)
src/debug.cc (+11/-7)
src/dlink.h (+5/-9)
src/dns_internal.cc (+57/-87)
src/esi/Element.h (+18/-0)
src/esi/Esi.cc (+30/-77)
src/esi/Makefile.am (+0/-1)
src/esi/Makefile.in (+4/-5)
src/esi/Sequence.cc (+8/-6)
src/esi/Sequence.h (+1/-2)
src/eui/Eui64.h (+1/-3)
src/fd.cc (+1/-2)
src/format/Format.cc (+3/-4)
src/fqdncache.cc (+1/-2)
src/fs/rock/RockRebuild.cc (+0/-1)
src/fs/ufs/UFSSwapDir.cc (+76/-101)
src/fs/ufs/UFSSwapDir.h (+1/-1)
src/fs_io.cc (+14/-13)
src/fs_io.h (+11/-1)
src/htcp.cc (+15/-20)
src/http/one/ResponseParser.cc (+1/-10)
src/http/url_rewriters/LFS/url_lfs_rewrite.8 (+1/-1)
src/icmp/Icmp.h (+11/-8)
src/icmp/IcmpPinger.cc (+1/-1)
src/icmp/IcmpSquid.cc (+0/-1)
src/icmp/net_db.cc (+1/-1)
src/icp_v2.cc (+2/-0)
src/ident/Ident.cc (+4/-2)
src/ipc/StoreMap.cc (+1/-3)
src/ipc/StoreMap.h (+16/-7)
src/ipc/TypedMsgHdr.cc (+24/-5)
src/ipc/TypedMsgHdr.h (+8/-3)
src/ipcache.cc (+1/-2)
src/log/DB/log_db_daemon.8 (+1/-1)
src/log/ModStdio.cc (+12/-7)
src/mem/old_api.cc (+13/-21)
src/neighbors.cc (+0/-8)
src/peer_digest.cc (+29/-22)
src/security/ServerOptions.cc (+7/-4)
src/security/cert_validators/fake/security_fake_certverify.8 (+1/-1)
src/servers/FtpServer.cc (+1/-4)
src/servers/Http1Server.cc (+13/-12)
src/snmp/Pdu.cc (+2/-1)
src/snmp/Pdu.h (+1/-1)
src/snmp/Session.cc (+19/-35)
src/snmp/Session.h (+2/-4)
src/snmp/Var.cc (+5/-9)
src/ssl/PeekingPeerConnector.cc (+5/-5)
src/stat.cc (+55/-114)
src/store.cc (+1/-1)
src/store/Disks.cc (+16/-16)
src/store/id_rewriters/file/storeid_file_rewrite.8 (+1/-1)
src/store_digest.cc (+17/-16)
src/store_rebuild.cc (+1/-1)
src/store_rebuild.h (+10/-16)
src/tests/stub_HttpReply.cc (+17/-16)
src/tests/stub_MemObject.cc (+2/-13)
src/tests/stub_cache_manager.cc (+1/-1)
src/tests/stub_client_side.cc (+0/-1)
src/tests/stub_libanyp.cc (+0/-1)
src/tests/stub_libcomm.cc (+0/-1)
src/tests/testRock.cc (+1/-1)
src/tests/testUfs.cc (+1/-1)
src/tools.cc (+1/-1)
src/tunnel.cc (+0/-1)
src/wccp2.cc (+2/-1)
tools/helper-mux/helper-mux.8 (+1/-1)
Conflict in debian/changelog
Conflict in debian/patches/0003-installed-binary-for-debian-ci.patch
Conflict in debian/patches/series
Conflict in debian/rules
Reviewer Review Type Date Requested Status
Canonical Server Core Reviewers Pending
Canonical Server Pending
Review via email: mp+356099@code.launchpad.net

Description of the change

Merge from debian's 4.2-2 in an attempt to fix #1794553, where upstream commented that the crash might be due to incomplete gcc8 fixes that are in 4.1 and that were improved in 4.2.

There is no evidence yet that 4.2-2 fixes the reported crash, though. Also, upstream's 4.3 has further gcc8 fixes. I'm also using squid from cosmic in my home proxy and haven't seen it crash yet.

This MP is to have a review in place, and address any issues it raises, so that if the reporter of the crash bug can eventually confirm that the crash is gone, we can land this branch without further delays.

I had to introduce one small delta to correct the last debian change which was to add -latomic to certain architectures. The way it was done, it was being added to all arches, not just the listed ones. I pushed a PR to salsa to fix that.

I spent some time investigating this debian change: "Add upstream pr264 patch for systemd (Closes: #903165)". It claims to also resolve launchpad bug #1103362, but I'm not sure. I can confirm that squid fails to start if it cannot resolve a hostname in an acl, but I failed to reproduce that case in a normal boot of the system, even when bind9 was installed and configured (via netplan) to be the sole dns resolver of this system.

Also of note about that fix is the fact that what was eventually merged upstream did not include the "Wants=network-online.target" line that the debian patch has, just the "After=" change. Compare:

debian's patch: https://salsa.debian.org/squid-team/squid/blob/447e7b7587841230ab0829d47fb951c6f5d5ba0b/debian/patches/0004-upstream-pr264.patch

Upstream commit: https://github.com/squid-cache/squid/commit/c321737de30e69b0d31944b8962eccd4e88b7267

The debian patch is now removed in salsa for the upcoming 4.3 release, exactly because upstream adopted it, but sans the "Wants=" line.

I can adopt the exact same change that upstream did, or keep debian's from 4.2-2. Right now this MP has debian's patch. As I said, I couldn't reproduce the mentioned bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903165 or https://bugs.launchpad.net/ubuntu/+source/squid3/+bug/1103362)

About the remaining gcc8 fixes, upstream hasn't committed all of them yet, so I kept my two changes in that regard: d/p/fix-uninitialized-var.patch, and -Wno-format-truncation.

To post a comment you must log in.

Unmerged commits

40a925c... by Andreas Hasenack

update-maintainer

e683dec... by Andreas Hasenack

reconstruct-changelog

545b881... by Andreas Hasenack

merge-changelogs

1b9f272... by Andreas Hasenack

  * Added:
    - d/rules: only use -latomic with the intended architectures, instead
      of all of them
      (https://salsa.debian.org/squid-team/squid/merge_requests/6 and see also
      https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907106#5)

9e2270c... by Andreas Hasenack

    - d/t/upstream-test-suite: drop the sed line, since patch
      0003-installed-binary-for-debian-ci.patch is doing this work now.
      (https://salsa.debian.org/squid-team/squid/commit/ad4372b444ba8b1587839)
      [Fixed in 4.2-1]

75cd25d... by Andreas Hasenack

    - d/t/0003-installed-binary-for-debian-ci.patch: use the squid
      binary from the system, instead of the one from the source tree.
      [Included in 4.2-1]

5573dde... by Andreas Hasenack

    - d/t/upstream-test-suite: also make libmem.la, needed by the tests.
      [Fixed in 4.2-1]

de21835... by Andreas Hasenack

    - d/t/test-squid.py: fix the process name. The PID points at the parent.
      [Fixed in 4.2-1]

ec27139... by Andreas Hasenack

    - d/t/test-squid.py: fix apparmor profile filename
      [Fixed in 4.2-1]

85eb3cd... by Andreas Hasenack

  * Dropped changes:
    - d/rules: enable cdbs parallel build
      [Adopted in 4.2-1]

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ChangeLog b/ChangeLog
2index 2d758a6..558d26c 100644
3--- a/ChangeLog
4+++ b/ChangeLog
5@@ -1,3 +1,16 @@
6+Changes to squid-4.2 (04 Aug 2018):
7+
8+ - Regression fix: support for https_port clientca= option
9+ - Regression Bug 4870: milliseconds logformats prepend 0s instead of spaces
10+ - Bug 4861: HTTPMSGLOCK missing pointer safety
11+ - Bug 4843 pt3: GCC-8 fixes and refactoring
12+ - HTTP: Do not update stored headers on 304 responses
13+ - Fix segmentation fault on -k parse
14+ - Fix %>ru logging of huge URLs
15+ - ... and several performance optimizations
16+ - ... and some documentation updates
17+ - ... and all fixes from 3.5.28
18+
19 Changes to squid-4.1 (02 Jul 2018):
20
21 - Bug 4223: fixed retries of failed re-forwardable transactions
22@@ -396,6 +409,23 @@ Changes to squid-4.0.1 (14 Oct 2015):
23 - ... and many documentation changes
24 - ... and much code cleanup and polishing
25
26+Changes to squid-3.5.28 (15 Jul 2018):
27+
28+ - SQUID-2018:1: crash processing SSL-Bumped traffic containing ESI
29+ - SQUID-2018:2: crash handling responses to internally generated requests
30+ - SQUID-2018:3 / CVE-2018-1172: crash in ESI Response processing
31+ - Bug 4861: HTTPMSGLOCK missing pointer safety
32+ - Bug 4829: IPC shared memory leaks when disker queue overflows
33+ - Bug 4767: SMP breaks IPv6 SNMP and cache manager queries
34+ - Bug 2821: Ignore Content-Range in non-206 responses
35+ - HTCP: Ignore HTCP packets with invalid URI
36+ - SSL-Bump: fix authentication with schemes other than Basic
37+ - TPROXY: Fix clientside_mark and client port logging
38+ - Fix "Cannot assign requested address" for to-origin TPROXY FTP data
39+ - Fix --with-netfilter-conntrack error message
40+ - Validate mime icon URL before allocating store entries
41+ - ... and many documentation changes
42+
43 Changes to squid-3.5.27 (20 Aug 2017):
44
45 - Regression Bug #4112: ssl_engine does not accept cryptodev
46diff --git a/RELEASENOTES.html b/RELEASENOTES.html
47index 3d44a11..77a8bbc 100644
48--- a/RELEASENOTES.html
49+++ b/RELEASENOTES.html
50@@ -2,10 +2,10 @@
51 <HTML>
52 <HEAD>
53 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.72">
54- <TITLE>Squid 4.1 release notes</TITLE>
55+ <TITLE>Squid 4.2 release notes</TITLE>
56 </HEAD>
57 <BODY>
58-<H1>Squid 4.1 release notes</H1>
59+<H1>Squid 4.2 release notes</H1>
60
61 <H2>Squid Developers</H2>
62 <HR>
63@@ -63,7 +63,7 @@ for Applied Network Research and members of the Web Caching community.</EM>
64 <HR>
65 <H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>
66
67-<P>The Squid Team are pleased to announce the release of Squid-4.1 for testing.</P>
68+<P>The Squid Team are pleased to announce the release of Squid-4.2 for testing.</P>
69 <P>This new release is available for download from
70 <A HREF="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</A> or the
71 <A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>
72diff --git a/configure b/configure
73index b9e4a85..abc441f 100755
74--- a/configure
75+++ b/configure
76@@ -1,7 +1,7 @@
77 #! /bin/sh
78 # From configure.ac Revision.
79 # Guess values for system-dependent variables and create Makefiles.
80-# Generated by GNU Autoconf 2.69 for Squid Web Proxy 4.1.
81+# Generated by GNU Autoconf 2.69 for Squid Web Proxy 4.2.
82 #
83 # Report bugs to <http://bugs.squid-cache.org/>.
84 #
85@@ -595,8 +595,8 @@ MAKEFLAGS=
86 # Identity of this package.
87 PACKAGE_NAME='Squid Web Proxy'
88 PACKAGE_TARNAME='squid'
89-PACKAGE_VERSION='4.1'
90-PACKAGE_STRING='Squid Web Proxy 4.1'
91+PACKAGE_VERSION='4.2'
92+PACKAGE_STRING='Squid Web Proxy 4.2'
93 PACKAGE_BUGREPORT='http://bugs.squid-cache.org/'
94 PACKAGE_URL=''
95
96@@ -1647,7 +1647,7 @@ if test "$ac_init_help" = "long"; then
97 # Omit some internal or obsolete options to make the list less imposing.
98 # This message is too long to be a string in the A/UX 3.1 sh.
99 cat <<_ACEOF
100-\`configure' configures Squid Web Proxy 4.1 to adapt to many kinds of systems.
101+\`configure' configures Squid Web Proxy 4.2 to adapt to many kinds of systems.
102
103 Usage: $0 [OPTION]... [VAR=VALUE]...
104
105@@ -1718,7 +1718,7 @@ fi
106
107 if test -n "$ac_init_help"; then
108 case $ac_init_help in
109- short | recursive ) echo "Configuration of Squid Web Proxy 4.1:";;
110+ short | recursive ) echo "Configuration of Squid Web Proxy 4.2:";;
111 esac
112 cat <<\_ACEOF
113
114@@ -2147,7 +2147,7 @@ fi
115 test -n "$ac_init_help" && exit $ac_status
116 if $ac_init_version; then
117 cat <<\_ACEOF
118-Squid Web Proxy configure 4.1
119+Squid Web Proxy configure 4.2
120 generated by GNU Autoconf 2.69
121
122 Copyright (C) 2012 Free Software Foundation, Inc.
123@@ -3251,7 +3251,7 @@ cat >config.log <<_ACEOF
124 This file contains any messages produced by compilers while
125 running configure, to aid debugging if configure makes a mistake.
126
127-It was created by Squid Web Proxy $as_me 4.1, which was
128+It was created by Squid Web Proxy $as_me 4.2, which was
129 generated by GNU Autoconf 2.69. Invocation command line was
130
131 $ $0 $@
132@@ -4118,7 +4118,7 @@ fi
133
134 # Define the identity of the package.
135 PACKAGE='squid'
136- VERSION='4.1'
137+ VERSION='4.2'
138
139
140 cat >>confdefs.h <<_ACEOF
141@@ -43832,7 +43832,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
142 # report actual input values of CONFIG_FILES etc. instead of their
143 # values after options handling.
144 ac_log="
145-This file was extended by Squid Web Proxy $as_me 4.1, which was
146+This file was extended by Squid Web Proxy $as_me 4.2, which was
147 generated by GNU Autoconf 2.69. Invocation command line was
148
149 CONFIG_FILES = $CONFIG_FILES
150@@ -43898,7 +43898,7 @@ _ACEOF
151 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
152 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
153 ac_cs_version="\\
154-Squid Web Proxy config.status 4.1
155+Squid Web Proxy config.status 4.2
156 configured by $0, generated by GNU Autoconf 2.69,
157 with options \\"\$ac_cs_config\\"
158
159diff --git a/configure.ac b/configure.ac
160index 9bdc7a6..23ab7c0 100644
161--- a/configure.ac
162+++ b/configure.ac
163@@ -5,7 +5,7 @@
164 ## Please see the COPYING and CONTRIBUTORS files for details.
165 ##
166
167-AC_INIT([Squid Web Proxy],[4.1],[http://bugs.squid-cache.org/],[squid])
168+AC_INIT([Squid Web Proxy],[4.2],[http://bugs.squid-cache.org/],[squid])
169 AC_PREREQ(2.61)
170 AC_CONFIG_HEADERS([include/autoconf.h])
171 AC_CONFIG_AUX_DIR(cfgaux)
172diff --git a/debian/changelog b/debian/changelog
173index 2b85ae0..a186caa 100644
174--- a/debian/changelog
175+++ b/debian/changelog
176@@ -1,3 +1,81 @@
177+<<<<<<< debian/changelog
178+=======
179+squid (4.2-2ubuntu1) cosmic; urgency=medium
180+
181+ * Merge with Debian unstable (LP: #1794553). Remaining changes:
182+ - Use snakeoil certificates.
183+ - Add an example refresh pattern for debs.
184+ - Add disabled by default AppArmor profile.
185+ - d/p/fix-uninitialized-var.patch: Workaround gcc's maybe-unitialized
186+ error in parse_time_t, triggered on ppc64el due to the build using -O3
187+ in that architecture.
188+ - d/rules: Add -Wno-format-truncation to CXXFLAGS as a workaround if
189+ building for ppc64el. On that arch, dpkg-buildflags sets -O3 instead of
190+ -O2 and that triggers a format-truncation error on pcon.cc. See
191+ See https://bugs.squid-cache.org/show_bug.cgi?id=4875
192+ - Update apparmor profile to grant read access to squid binary
193+ (LP #1792728)
194+ * Dropped changes:
195+ - d/rules: enable cdbs parallel build
196+ [Adopted in 4.2-1]
197+ - d/t/test-squid.py: fix apparmor profile filename
198+ [Fixed in 4.2-1]
199+ - d/t/test-squid.py: fix the process name. The PID points at the parent.
200+ [Fixed in 4.2-1]
201+ - d/t/upstream-test-suite: also make libmem.la, needed by the tests.
202+ [Fixed in 4.2-1]
203+ - d/t/0003-installed-binary-for-debian-ci.patch: use the squid
204+ binary from the system, instead of the one from the source tree.
205+ [Included in 4.2-1]
206+ - d/t/upstream-test-suite: drop the sed line, since patch
207+ 0003-installed-binary-for-debian-ci.patch is doing this work now.
208+ (https://salsa.debian.org/squid-team/squid/commit/ad4372b444ba8b1587839)
209+ [Fixed in 4.2-1]
210+ * Added:
211+ - d/rules: only use -latomic with the intended architectures, instead
212+ of all of them
213+ (https://salsa.debian.org/squid-team/squid/merge_requests/6 and see also
214+ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907106#5)
215+
216+ -- Andreas Hasenack <andreas@canonical.com> Wed, 03 Oct 2018 16:20:37 -0300
217+
218+squid (4.2-2) unstable; urgency=high
219+
220+ [ Adrian Bunk <bunk@debian.org> ]
221+ * Add -latomic for rmel m68k mips mipsel powerpc powerpcspe sh4
222+ (Closes: #907106)
223+
224+ -- Luigi Gangitano <luigi@debian.org> Fri, 24 Aug 2018 08:57:15 +0200
225+
226+squid (4.2-1) unstable; urgency=high
227+
228+ [ Amos Jeffries <amosjeffries@squid-cache.org> ]
229+ * New Upstream Release
230+
231+ * debian/patches/
232+ - Patch to use installed binary for upstream config tests
233+ - Remove patches included upstream: 0011-upstream-pr172.patch
234+ - Add upstream pr264 patch for systemd (Closes: #903165)
235+
236+ * debian/control
237+ - Bumped Standards-Version to 4.2.0.0, no change needed
238+
239+ [ Andreas Hasenack ]
240+ * Enable CDBS parallel build
241+ * d/t/upstream-test-suite: also make libmem.la, needed by the tests.
242+ * d/t/test-squid.py: fix apparmor profile filename
243+ * debian/tests/control: add ssl-cert to the list of dependencies of the
244+ squid test, as apache is configured to load
245+ /etc/ssl/certs/ssl-cert-snakeoil.pem in that test.
246+ * d/t/test-squid.py: fix the process name. The PID points at the parent.
247+
248+ [ Luigi Gangitano ]
249+ * debian/control
250+ - Fix Vcs-Git and Vcs-Browser URLs
251+
252+ -- Luigi Gangitano <luigi@debian.org> Wed, 22 Aug 2018 13:57:15 +0200
253+
254+>>>>>>> debian/changelog
255 squid (4.1-1ubuntu2) cosmic; urgency=medium
256
257 * d/usr.sbin.squid: Update apparmor profile to grant read access to squid
258diff --git a/debian/control b/debian/control
259index bdd9c4f..d6f27cc 100644
260--- a/debian/control
261+++ b/debian/control
262@@ -5,9 +5,9 @@ Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
263 XSBC-Original-Maintainer: Luigi Gangitano <luigi@debian.org>
264 Uploaders: Santiago Garcia Mantinan <manty@debian.org>
265 Homepage: http://www.squid-cache.org
266-Standards-Version: 4.1.4
267-Vcs-Git: git://salsa.debian.org/squid-team/squid.git
268-Vcs-Browser: https://salsa.debian.org/squid-team/squid.git
269+Standards-Version: 4.2.0.0
270+Vcs-Git: https://salsa.debian.org/squid-team/squid.git
271+Vcs-Browser: https://salsa.debian.org/squid-team/squid
272 Build-Depends: ed, libltdl-dev, pkg-config
273 , g++ (>= 4.9) | clang (>= 3.7)
274 , gcc (>= 4.9) | clang (>= 3.7)
275diff --git a/debian/patches/0003-installed-binary-for-debian-ci.patch b/debian/patches/0003-installed-binary-for-debian-ci.patch
276index abbe089..fe90e8c 100644
277--- a/debian/patches/0003-installed-binary-for-debian-ci.patch
278+++ b/debian/patches/0003-installed-binary-for-debian-ci.patch
279@@ -1,3 +1,4 @@
280+<<<<<<< debian/patches/0003-installed-binary-for-debian-ci.patch
281 Description: Use installed squid binary for Debian CI testing
282 Upstream config tests are designed for use during builds. Debian CI uses a
283 pre-built binary installation.
284@@ -14,6 +15,17 @@ index c8ff455d..bb7aef46 100644
285 --- a/test-suite/Makefile.am
286 +++ b/test-suite/Makefile.am
287 @@ -150,7 +150,7 @@ VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc stub_libmem.cc $(DEBUG_
288+=======
289+From: Amos Jeffries <amosjeffries@squid-cache.org>
290+Date: Sat, 21 Jul 2018 21:07:00 +1300
291+Subject: Use installed squid binary for Debian CI testing
292+
293+Index: pkg-squid/test-suite/Makefile.am
294+===================================================================
295+--- pkg-squid.orig/test-suite/Makefile.am
296++++ pkg-squid/test-suite/Makefile.am
297+@@ -150,7 +150,7 @@ VirtualDeleteOperator_SOURCES = VirtualD
298+>>>>>>> debian/patches/0003-installed-binary-for-debian-ci.patch
299 squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
300 @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
301 for cfg in $$cfglist ; do \
302@@ -22,10 +34,17 @@ index c8ff455d..bb7aef46 100644
303 { echo "FAIL: squid.conf test: $$cfg" | \
304 sed s%$(top_builddir)/src/%% | \
305 sed s%$(srcdir)/squidconf/%% ; \
306+<<<<<<< debian/patches/0003-installed-binary-for-debian-ci.patch
307 diff --git a/test-suite/Makefile.in b/test-suite/Makefile.in
308 index 5e7cd5fa..15f78635 100644
309 --- a/test-suite/Makefile.in
310 +++ b/test-suite/Makefile.in
311+=======
312+Index: pkg-squid/test-suite/Makefile.in
313+===================================================================
314+--- pkg-squid.orig/test-suite/Makefile.in
315++++ pkg-squid/test-suite/Makefile.in
316+>>>>>>> debian/patches/0003-installed-binary-for-debian-ci.patch
317 @@ -1477,7 +1477,7 @@ STUB.h: $(top_srcdir)/src/tests/STUB.h
318 squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
319 @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
320diff --git a/debian/patches/0004-upstream-pr264.patch b/debian/patches/0004-upstream-pr264.patch
321new file mode 100644
322index 0000000..ac24243
323--- /dev/null
324+++ b/debian/patches/0004-upstream-pr264.patch
325@@ -0,0 +1,28 @@
326+From 90218ea99bb5c79b9be594777963ca91667f5fa2 Mon Sep 17 00:00:00 2001
327+From: Amos Jeffries <amosjeffries@squid-cache.org>
328+Date: Sun, 29 Jul 2018 02:43:21 +1200
329+Subject: [PATCH 1/2] Update systemd dependencies in squid.service
330+
331+The network.target is not sufficient to guarantee network interfces and IPs
332+are assigned and available. Particularly when systemd is not in charge
333+of the IP assignment itself.
334+Use network-online.target as well, which should ensure network is
335+properly configured and online before starting Squid.
336+---
337+ tools/systemd/squid.service | 1 +
338+ 1 file changed, 1 insertion(+)
339+
340+diff --git a/tools/systemd/squid.service b/tools/systemd/squid.service
341+index badfb677..eca4fc5c 100644
342+--- a/tools/systemd/squid.service
343++++ b/tools/systemd/squid.service
344+@@ -8,7 +8,8 @@
345+ [Unit]
346+ Description=Squid Web Proxy Server
347+ Documentation=man:squid(8)
348+-After=network.target nss-lookup.target
349++After=network.target network-online.target nss-lookup.target
350++Wants=network-online.target
351+
352+ [Service]
353+ Type=forking
354diff --git a/debian/patches/0011-upstream-pr172.patch b/debian/patches/0011-upstream-pr172.patch
355deleted file mode 100644
356index 4ea48b3..0000000
357--- a/debian/patches/0011-upstream-pr172.patch
358+++ /dev/null
359@@ -1,3407 +0,0 @@
360-Upstream patch from PR 172 resolves build issues with GCC-8
361-
362-diff --git a/src/CacheManager.h b/src/CacheManager.h
363-index 9d2c5ce1..e0906479 100644
364---- a/src/CacheManager.h
365-+++ b/src/CacheManager.h
366-@@ -58,9 +58,6 @@ protected:
367- void registerProfile(const Mgr::ActionProfilePointer &profile);
368-
369- Menu menu_;
370--
371--private:
372-- static CacheManager* instance;
373- };
374-
375- #endif /* SQUID_CACHEMANAGER_H */
376-diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc
377-index 7f8b1d10..1946ae48 100644
378---- a/src/HttpRequest.cc
379-+++ b/src/HttpRequest.cc
380-@@ -80,7 +80,7 @@ HttpRequest::init()
381- #if USE_AUTH
382- auth_user_request = NULL;
383- #endif
384-- memset(&flags, '\0', sizeof(flags));
385-+ flags = RequestFlags();
386- range = NULL;
387- ims = -1;
388- imslen = 0;
389-diff --git a/src/MemObject.cc b/src/MemObject.cc
390-index 204699a1..6974cfc8 100644
391---- a/src/MemObject.cc
392-+++ b/src/MemObject.cc
393-@@ -96,30 +96,18 @@ MemObject::setUris(char const *aStoreId, char const *aLogUri, const HttpRequestM
394- #endif
395- }
396-
397--MemObject::MemObject() :
398-- inmem_lo(0),
399-- nclients(0),
400-- request(nullptr),
401-- ping_reply_callback(nullptr),
402-- ircb_data(nullptr),
403-- id(0),
404-- object_sz(-1),
405-- swap_hdr_sz(0),
406--#if URL_CHECKSUM_DEBUG
407-- chksum(0),
408--#endif
409-- vary_headers(nullptr)
410-+MemObject::MemObject()
411- {
412-- debugs(20, 3, "new MemObject " << this);
413-+ debugs(20, 3, "MemObject constructed, this=" << this);
414-+ ping_reply_callback = nullptr;
415- memset(&start_ping, 0, sizeof(start_ping));
416-- memset(&abort, 0, sizeof(abort));
417- _reply = new HttpReply;
418- HTTPMSGLOCK(_reply);
419- }
420-
421- MemObject::~MemObject()
422- {
423-- debugs(20, 3, "del MemObject " << this);
424-+ debugs(20, 3, "MemObject destructed, this=" << this);
425- const Ctx ctx = ctx_enter(hasUris() ? urlXXX() : "[unknown_ctx]");
426-
427- #if URL_CHECKSUM_DEBUG
428-diff --git a/src/MemObject.h b/src/MemObject.h
429-index 508fb4e9..53c15029 100644
430---- a/src/MemObject.h
431-+++ b/src/MemObject.h
432-@@ -103,26 +103,24 @@ public:
433-
434- HttpRequestMethod method;
435- mem_hdr data_hdr;
436-- int64_t inmem_lo;
437-+ int64_t inmem_lo = 0;
438- dlink_list clients;
439-
440- size_t clientCount() const {return nclients;}
441-
442- bool clientIsFirst(void *sc) const {return (clients.head && sc == clients.head->data);}
443-
444-- int nclients;
445-+ int nclients = 0;
446-
447- class SwapOut
448- {
449- public:
450-- SwapOut() : queue_offset(0), decision(swNeedsCheck) {}
451--
452-- int64_t queue_offset; ///< number of bytes sent to SwapDir for writing
453-+ int64_t queue_offset = 0; ///< number of bytes sent to SwapDir for writing
454- StoreIOState::Pointer sio;
455-
456- /// Decision states for StoreEntry::swapoutPossible() and related code.
457- typedef enum { swNeedsCheck = 0, swImpossible = -1, swPossible = +1, swStarted } Decision;
458-- Decision decision; ///< current decision state
459-+ Decision decision = swNeedsCheck; ///< current decision state
460- };
461-
462- SwapOut swapout;
463-@@ -138,10 +136,8 @@ public:
464- class XitTable
465- {
466- public:
467-- XitTable(): index(-1), io(ioUndecided) {}
468--
469-- int32_t index; ///< entry position inside the in-transit table
470-- Io io; ///< current I/O state
471-+ int32_t index = -1; ///< entry position inside the in-transit table
472-+ Io io = ioUndecided; ///< current I/O state
473- };
474- XitTable xitTable; ///< current [shared] memory caching state for the entry
475-
476-@@ -149,34 +145,32 @@ public:
477- class MemCache
478- {
479- public:
480-- MemCache(): index(-1), offset(0), io(ioUndecided) {}
481-+ int32_t index = -1; ///< entry position inside the memory cache
482-+ int64_t offset = 0; ///< bytes written/read to/from the memory cache so far
483-
484-- int32_t index; ///< entry position inside the memory cache
485-- int64_t offset; ///< bytes written/read to/from the memory cache so far
486--
487-- Io io; ///< current I/O state
488-+ Io io = ioUndecided; ///< current I/O state
489- };
490- MemCache memCache; ///< current [shared] memory caching state for the entry
491-
492- /* Read only - this reply must be preserved by store clients */
493- /* The original reply. possibly with updated metadata. */
494-- HttpRequest *request;
495-+ HttpRequest *request = nullptr;
496-
497- struct timeval start_ping;
498- IRCB *ping_reply_callback;
499-- void *ircb_data;
500-+ void *ircb_data = nullptr;
501-
502-- struct {
503-+ struct abort_ {
504-+ abort_() { callback = nullptr; }
505- STABH *callback;
506-- void *data;
507-+ void *data = nullptr;
508- } abort;
509- RemovalPolicyNode repl;
510-- int id;
511-- int64_t object_sz;
512-- size_t swap_hdr_sz;
513-+ int id = 0;
514-+ int64_t object_sz = -1;
515-+ size_t swap_hdr_sz = 0;
516- #if URL_CHECKSUM_DEBUG
517--
518-- unsigned int chksum;
519-+ unsigned int chksum = 0;
520- #endif
521-
522- SBuf vary_headers;
523-@@ -185,7 +179,7 @@ public:
524- void kickReads();
525-
526- private:
527-- HttpReply *_reply;
528-+ HttpReply *_reply = nullptr;
529-
530- mutable String storeId_; ///< StoreId for our entry (usually request URI)
531- mutable String logUri_; ///< URI used for logging (usually request URI)
532-diff --git a/src/PeerDigest.h b/src/PeerDigest.h
533-index 442e9054..17a36601 100644
534---- a/src/PeerDigest.h
535-+++ b/src/PeerDigest.h
536-@@ -76,35 +76,38 @@ class PeerDigest
537- CBDATA_CLASS(PeerDigest);
538-
539- public:
540-- CachePeer *peer; /**< pointer back to peer structure, argh */
541-- CacheDigest *cd; /**< actual digest structure */
542-+ PeerDigest(CachePeer *);
543-+ ~PeerDigest();
544-+
545-+ CachePeer *peer = nullptr; /**< pointer back to peer structure, argh */
546-+ CacheDigest *cd = nullptr; /**< actual digest structure */
547- String host; /**< copy of peer->host */
548-- const char *req_result; /**< text status of the last request */
549-+ const char *req_result = nullptr; /**< text status of the last request */
550-
551- struct {
552-- bool needed; /**< there were requests for this digest */
553-- bool usable; /**< can be used for lookups */
554-- bool requested; /**< in process of receiving [fresh] digest */
555-+ bool needed = false; /**< there were requests for this digest */
556-+ bool usable = false; /**< can be used for lookups */
557-+ bool requested = false; /**< in process of receiving [fresh] digest */
558- } flags;
559-
560- struct {
561- /* all times are absolute unless augmented with _delay */
562-- time_t initialized; /* creation */
563-- time_t needed; /* first lookup/use by a peer */
564-- time_t next_check; /* next scheduled check/refresh event */
565-- time_t retry_delay; /* delay before re-checking _invalid_ digest */
566-- time_t requested; /* requested a fresh copy of a digest */
567-- time_t req_delay; /* last request response time */
568-- time_t received; /* received the current copy of a digest */
569-- time_t disabled; /* disabled for good */
570-+ time_t initialized = 0; /* creation */
571-+ time_t needed = 0; /* first lookup/use by a peer */
572-+ time_t next_check = 0; /* next scheduled check/refresh event */
573-+ time_t retry_delay = 0; /* delay before re-checking _invalid_ digest */
574-+ time_t requested = 0; /* requested a fresh copy of a digest */
575-+ time_t req_delay = 0; /* last request response time */
576-+ time_t received = 0; /* received the current copy of a digest */
577-+ time_t disabled = 0; /* disabled for good */
578- } times;
579-
580- struct {
581- CacheDigestGuessStats guess;
582-- int used_count;
583-+ int used_count = 0;
584-
585- struct {
586-- int msgs;
587-+ int msgs = 0;
588- ByteCounter kbytes;
589- } sent, recv;
590- } stats;
591-@@ -112,7 +115,7 @@ public:
592-
593- extern const Version CacheDigestVer;
594-
595--PeerDigest *peerDigestCreate(CachePeer * p);
596-+void peerDigestCreate(CachePeer * p);
597- void peerDigestNeeded(PeerDigest * pd);
598- void peerDigestNotePeerGone(PeerDigest * pd);
599- void peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e);
600-diff --git a/src/SquidConfig.h b/src/SquidConfig.h
601-index 1832d4cd..3bbc0a5a 100644
602---- a/src/SquidConfig.h
603-+++ b/src/SquidConfig.h
604-@@ -24,6 +24,7 @@
605- #include "ssl/support.h"
606- #endif
607- #include "store/forward.h"
608-+#include "store/Disk.h"
609-
610- #if USE_OPENSSL
611- class sslproxy_cert_sign;
612-@@ -50,11 +51,14 @@ class PortCfg;
613- namespace Store {
614- class DiskConfig {
615- public:
616-- RefCount<SwapDir> *swapDirs;
617-- int n_allocated;
618-- int n_configured;
619-+ DiskConfig() { assert(swapDirs == nullptr); }
620-+ ~DiskConfig() { delete[] swapDirs; }
621-+
622-+ RefCount<SwapDir> *swapDirs = nullptr;
623-+ int n_allocated = 0;
624-+ int n_configured = 0;
625- /// number of disk processes required to support all cache_dirs
626-- int n_strands;
627-+ int n_strands = 0;
628- };
629- #define INDEXSD(i) (Config.cacheSwap.swapDirs[i].getRaw())
630- }
631-diff --git a/src/StatCounters.h b/src/StatCounters.h
632-index e5578352..85bd86d6 100644
633---- a/src/StatCounters.h
634-+++ b/src/StatCounters.h
635-@@ -17,29 +17,31 @@
636- class CacheDigestGuessStats
637- {
638- public:
639-- int trueHits;
640-- int falseHits;
641-- int trueMisses;
642-- int falseMisses;
643-- int closeHits; /// \todo: temporary remove it later
644-+ int trueHits = 0;
645-+ int falseHits = 0;
646-+ int trueMisses = 0;
647-+ int falseMisses = 0;
648-+ int closeHits = 0; /// \todo: temporary remove it later
649- };
650- #endif
651-
652- /** General collection of process-wide statistics.
653- *
654-- * \note if you add a field to StatCounters,
655-- * you MUST sync statCountersInitSpecial, statCountersClean, and statCountersCopy
656-+ * \note if you add a field to StatCounters which requires any non-trivial
657-+ * initialization or copy you MUST sync statCountersInitSpecial()
658- */
659- class StatCounters
660- {
661- public:
662-+ StatCounters() : timestamp(current_time) {}
663-+
664- struct {
665-- int clients;
666-- int requests;
667-- int hits;
668-- int mem_hits;
669-- int disk_hits;
670-- int errors;
671-+ int clients = 0;
672-+ int requests = 0;
673-+ int hits = 0;
674-+ int mem_hits = 0;
675-+ int disk_hits = 0;
676-+ int errors = 0;
677- ByteCounter kbytes_in;
678- ByteCounter kbytes_out;
679- ByteCounter hit_kbytes_out;
680-@@ -53,24 +55,24 @@ public:
681- struct {
682-
683- struct {
684-- int requests;
685-- int errors;
686-+ int requests = 0;
687-+ int errors = 0;
688- ByteCounter kbytes_in;
689- ByteCounter kbytes_out;
690- } all , http, ftp, other;
691- } server;
692-
693- struct {
694-- int pkts_sent;
695-- int queries_sent;
696-- int replies_sent;
697-- int pkts_recv;
698-- int queries_recv;
699-- int replies_recv;
700-- int hits_sent;
701-- int hits_recv;
702-- int replies_queued;
703-- int replies_dropped;
704-+ int pkts_sent = 0;
705-+ int queries_sent = 0;
706-+ int replies_sent = 0;
707-+ int pkts_recv = 0;
708-+ int queries_recv = 0;
709-+ int replies_recv = 0;
710-+ int hits_sent = 0;
711-+ int hits_recv = 0;
712-+ int replies_queued = 0;
713-+ int replies_dropped = 0;
714- ByteCounter kbytes_sent;
715- ByteCounter q_kbytes_sent;
716- ByteCounter r_kbytes_sent;
717-@@ -79,17 +81,17 @@ public:
718- ByteCounter r_kbytes_recv;
719- StatHist querySvcTime;
720- StatHist replySvcTime;
721-- int query_timeouts;
722-- int times_used;
723-+ int query_timeouts = 0;
724-+ int times_used = 0;
725- } icp;
726-
727- struct {
728-- int pkts_sent;
729-- int pkts_recv;
730-+ int pkts_sent = 0;
731-+ int pkts_recv = 0;
732- } htcp;
733-
734- struct {
735-- int requests;
736-+ int requests = 0;
737- } unlink;
738-
739- struct {
740-@@ -97,28 +99,26 @@ public:
741- } dns;
742-
743- struct {
744-- int times_used;
745-+ int times_used = 0;
746- ByteCounter kbytes_sent;
747- ByteCounter kbytes_recv;
748- ByteCounter memory;
749-- int msgs_sent;
750-- int msgs_recv;
751-+ int msgs_sent = 0;
752-+ int msgs_recv = 0;
753- #if USE_CACHE_DIGESTS
754--
755- CacheDigestGuessStats guess;
756- #endif
757--
758- StatHist on_xition_count;
759- } cd;
760-
761- struct {
762-- int times_used;
763-+ int times_used = 0;
764- } netdb;
765-- int page_faults;
766-- unsigned long int select_loops;
767-- int select_fds;
768-- double select_time;
769-- double cputime;
770-+ int page_faults = 0;
771-+ unsigned long int select_loops = 0;
772-+ int select_fds = 0;
773-+ double select_time = 0.0;
774-+ double cputime = 0.0;
775-
776- struct timeval timestamp;
777- StatHist comm_udp_incoming;
778-@@ -128,36 +128,34 @@ public:
779-
780- struct {
781- struct {
782-- int opens;
783-- int closes;
784-- int reads;
785-- int writes;
786-- int seeks;
787-- int unlinks;
788-+ int opens = 0;
789-+ int closes = 0;
790-+ int reads = 0;
791-+ int writes = 0;
792-+ int seeks = 0;
793-+ int unlinks = 0;
794- } disk;
795-
796- struct {
797-- int accepts;
798-- int sockets;
799-- int connects;
800-- int binds;
801-- int closes;
802-- int reads;
803-- int writes;
804-- int recvfroms;
805-- int sendtos;
806-+ int accepts = 0;
807-+ int sockets = 0;
808-+ int connects = 0;
809-+ int binds = 0;
810-+ int closes = 0;
811-+ int reads = 0;
812-+ int writes = 0;
813-+ int recvfroms = 0;
814-+ int sendtos = 0;
815- } sock;
816-- int selects;
817-+ int selects = 0;
818- } syscalls;
819-- int aborted_requests;
820-+ int aborted_requests = 0;
821-
822- struct {
823-- int files_cleaned;
824-- int outs;
825-- int ins;
826-+ int files_cleaned = 0;
827-+ int outs = 0;
828-+ int ins = 0;
829- } swap;
830--
831--private:
832- };
833-
834- extern StatCounters statCounter;
835-diff --git a/src/StatHist.h b/src/StatHist.h
836-index ef371b53..63bed853 100644
837---- a/src/StatHist.h
838-+++ b/src/StatHist.h
839-@@ -34,21 +34,17 @@ public:
840- * \todo specialize the class in a small hierarchy so that all
841- * relevant initializations are done at build-time
842- */
843-- StatHist();
844-- StatHist(const StatHist&); //not needed
845-- ~StatHist() { clear(); };
846-+ StatHist() = default;
847-+ StatHist(const StatHist &);
848-+ ~StatHist() {
849-+ xfree(bins); // can handle case of bins being nullptr
850-+ capacity_ = 0; // mark as destructed, may be needed for troubleshooting
851-+ }
852-
853- typedef uint64_t bins_type;
854-
855- StatHist &operator=(const StatHist &);
856-
857-- /** clear the contents of the histograms
858-- *
859-- * \todo remove: this function has been replaced in its purpose
860-- * by the destructor
861-- */
862-- void clear();
863--
864- /** Calculate the percentile for value pctile for the difference between
865- * this and the supplied histogram.
866- */
867-@@ -102,19 +98,19 @@ protected:
868- unsigned int findBin(double v);
869-
870- /// the histogram counters
871-- bins_type *bins;
872-- unsigned int capacity_;
873-+ bins_type *bins = nullptr;
874-+ unsigned int capacity_ = 0;
875-
876- /// minimum value to be stored, corresponding to the first bin
877-- double min_;
878-+ double min_ = 0.0;
879-
880- /// value of the maximum counter in the histogram
881-- double max_;
882-+ double max_ = 0.0;
883-
884- /// scaling factor when looking for a bin
885-- double scale_;
886-- hbase_f *val_in; /* e.g., log() for log-based histogram */
887-- hbase_f *val_out; /* e.g., exp() for log based histogram */
888-+ double scale_ = 1.0;
889-+ hbase_f *val_in = nullptr; /* e.g., log() for log-based histogram */
890-+ hbase_f *val_out = nullptr; /* e.g., exp() for log based histogram */
891- };
892-
893- double statHistDeltaMedian(const StatHist & A, const StatHist & B);
894-@@ -137,24 +133,10 @@ StatHist::operator =(const StatHist & src)
895- scale_=src.scale_;
896- val_in=src.val_in;
897- val_out=src.val_out;
898-- if (bins != NULL)
899-+ if (bins)
900- memcpy(bins,src.bins,capacity_*sizeof(*bins));
901- return *this;
902- }
903-
904--inline
905--StatHist::StatHist() :
906-- bins(NULL), capacity_(0), min_(0), max_(0),
907-- scale_(1.0), val_in(NULL), val_out(NULL)
908--{}
909--
910--inline void
911--StatHist::clear()
912--{
913-- xfree(bins); // can handle case of bins being NULL
914-- bins=NULL;
915-- capacity_=0; // mark as destructed, may be needed for troubleshooting
916--}
917--
918- #endif /* STATHIST_H_ */
919-
920-diff --git a/src/acl/BoolOps.cc b/src/acl/BoolOps.cc
921-index 294b0961..6a7e0d35 100644
922---- a/src/acl/BoolOps.cc
923-+++ b/src/acl/BoolOps.cc
924-@@ -17,9 +17,10 @@
925- Acl::NotNode::NotNode(ACL *acl)
926- {
927- assert(acl);
928-+ Must(strlen(acl->name) <= sizeof(name)-2);
929- name[0] = '!';
930- name[1] = '\0';
931-- strncat(&name[1], acl->name, sizeof(name)-1-1);
932-+ xstrncpy(&name[1], acl->name, sizeof(name)-1); // -1 for '!'
933- add(acl);
934- }
935-
936-diff --git a/src/anyp/TrafficMode.h b/src/anyp/TrafficMode.h
937-index c1bb4002..2e471c48 100644
938---- a/src/anyp/TrafficMode.h
939-+++ b/src/anyp/TrafficMode.h
940-@@ -21,17 +21,13 @@ namespace AnyP
941- class TrafficMode
942- {
943- public:
944-- TrafficMode() : accelSurrogate(false), proxySurrogate(false), natIntercept(false), tproxyIntercept(false), tunnelSslBumping(false) {}
945-- TrafficMode(const TrafficMode &rhs) { operator =(rhs); }
946-- TrafficMode &operator =(const TrafficMode &rhs) { memcpy(this, &rhs, sizeof(TrafficMode)); return *this; }
947--
948- /** marks HTTP accelerator (reverse/surrogate proxy) traffic
949- *
950- * Indicating the following are required:
951- * - URL translation from relative to absolute form
952- * - restriction to origin peer relay recommended
953- */
954-- bool accelSurrogate;
955-+ bool accelSurrogate = false;
956-
957- /** marks ports receiving PROXY protocol traffic
958- *
959-@@ -41,7 +37,7 @@ public:
960- * - indirect client IP trust verification is mandatory
961- * - TLS is not supported
962- */
963-- bool proxySurrogate;
964-+ bool proxySurrogate = false;
965-
966- /** marks NAT intercepted traffic
967- *
968-@@ -52,7 +48,7 @@ public:
969- * - destination pinning is recommended
970- * - authentication prohibited
971- */
972-- bool natIntercept;
973-+ bool natIntercept = false;
974-
975- /** marks TPROXY intercepted traffic
976- *
977-@@ -64,7 +60,7 @@ public:
978- * - destination pinning is recommended
979- * - authentication prohibited
980- */
981-- bool tproxyIntercept;
982-+ bool tproxyIntercept = false;
983-
984- /** marks intercept and decryption of CONNECT (tunnel) SSL traffic
985- *
986-@@ -75,7 +71,7 @@ public:
987- * - encrypted outbound server connections
988- * - peer relay prohibited. TODO: re-encrypt and re-wrap with CONNECT
989- */
990-- bool tunnelSslBumping;
991-+ bool tunnelSslBumping = false;
992-
993- /** true if the traffic is in any way intercepted
994- *
995-diff --git a/src/cache_cf.cc b/src/cache_cf.cc
996-index 006a42d3..7beb77f0 100644
997---- a/src/cache_cf.cc
998-+++ b/src/cache_cf.cc
999-@@ -2298,15 +2298,8 @@ parse_peer(CachePeer ** head)
1000- p->connect_fail_limit = 10;
1001-
1002- #if USE_CACHE_DIGESTS
1003--
1004-- if (!p->options.no_digest) {
1005-- /* XXX This looks odd.. who has the original pointer
1006-- * then?
1007-- */
1008-- PeerDigest *pd = peerDigestCreate(p);
1009-- p->digest = cbdataReference(pd);
1010-- }
1011--
1012-+ if (!p->options.no_digest)
1013-+ peerDigestCreate(p);
1014- #endif
1015-
1016- p->index = ++Config.npeers;
1017-diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc
1018-index b2f0ebd0..efe47194 100644
1019---- a/src/client_side_reply.cc
1020-+++ b/src/client_side_reply.cc
1021-@@ -1444,13 +1444,8 @@ clientReplyContext::buildReplyHeader()
1022- */
1023- /* TODO: if maxage or s-maxage is present, don't do this */
1024-
1025-- if (squid_curtime - http->storeEntry()->timestamp >= 86400) {
1026-- char tbuf[512];
1027-- snprintf (tbuf, sizeof(tbuf), "%s %s %s",
1028-- "113", ThisCache,
1029-- "This cache hit is still fresh and more than 1 day old");
1030-- hdr->putStr(Http::HdrType::WARNING, tbuf);
1031-- }
1032-+ if (squid_curtime - http->storeEntry()->timestamp >= 86400)
1033-+ hdr->putWarning(113, "This cache hit is still fresh and more than 1 day old");
1034- }
1035- }
1036-
1037-diff --git a/src/clients/FtpGateway.cc b/src/clients/FtpGateway.cc
1038-index d0bfb801..bdd2854d 100644
1039---- a/src/clients/FtpGateway.cc
1040-+++ b/src/clients/FtpGateway.cc
1041-@@ -10,6 +10,7 @@
1042-
1043- #include "squid.h"
1044- #include "acl/FilledChecklist.h"
1045-+#include "base/PackableStream.h"
1046- #include "clients/forward.h"
1047- #include "clients/FtpClient.h"
1048- #include "comm.h"
1049-@@ -132,7 +133,7 @@ public:
1050- void unhack();
1051- void readStor();
1052- void parseListing();
1053-- MemBuf *htmlifyListEntry(const char *line);
1054-+ bool htmlifyListEntry(const char *line, PackableStream &);
1055- void completedListing(void);
1056-
1057- /// create a data channel acceptor and start listening.
1058-@@ -764,53 +765,37 @@ found:
1059- return p;
1060- }
1061-
1062--MemBuf *
1063--Ftp::Gateway::htmlifyListEntry(const char *line)
1064-+bool
1065-+Ftp::Gateway::htmlifyListEntry(const char *line, PackableStream &html)
1066- {
1067-- char icon[2048];
1068-- char href[2048 + 40];
1069-- char text[ 2048];
1070-- char size[ 2048];
1071-- char chdir[ 2048 + 40];
1072-- char view[ 2048 + 40];
1073-- char download[ 2048 + 40];
1074-- char link[ 2048 + 40];
1075-- MemBuf *html;
1076-- char prefix[2048];
1077-- ftpListParts *parts;
1078-- *icon = *href = *text = *size = *chdir = *view = *download = *link = '\0';
1079--
1080-- debugs(9, 7, HERE << " line ={" << line << "}");
1081-+ debugs(9, 7, "line={" << line << "}");
1082-
1083- if (strlen(line) > 1024) {
1084-- html = new MemBuf();
1085-- html->init();
1086-- html->appendf("<tr><td colspan=\"5\">%s</td></tr>\n", line);
1087-- return html;
1088-+ html << "<tr><td colspan=\"5\">" << line << "</td></tr>\n";
1089-+ return true;
1090- }
1091-
1092-- if (flags.dir_slash && dirpath && typecode != 'D')
1093-- snprintf(prefix, 2048, "%s/", rfc1738_escape_part(dirpath));
1094-- else
1095-- prefix[0] = '\0';
1096--
1097-- if ((parts = ftpListParseParts(line, flags)) == NULL) {
1098-- const char *p;
1099-+ SBuf prefix;
1100-+ if (flags.dir_slash && dirpath && typecode != 'D') {
1101-+ prefix.append(rfc1738_escape_part(dirpath));
1102-+ prefix.append("/", 1);
1103-+ }
1104-
1105-- html = new MemBuf();
1106-- html->init();
1107-- html->appendf("<tr class=\"entry\"><td colspan=\"5\">%s</td></tr>\n", line);
1108-+ ftpListParts *parts = ftpListParseParts(line, flags);
1109-+ if (!parts) {
1110-+ html << "<tr class=\"entry\"><td colspan=\"5\">" << line << "</td></tr>\n";
1111-
1112-+ const char *p;
1113- for (p = line; *p && xisspace(*p); ++p);
1114- if (*p && !xisspace(*p))
1115- flags.listformat_unknown = 1;
1116-
1117-- return html;
1118-+ return true;
1119- }
1120-
1121- if (!strcmp(parts->name, ".") || !strcmp(parts->name, "..")) {
1122- ftpListPartsFree(&parts);
1123-- return NULL;
1124-+ return false;
1125- }
1126-
1127- parts->size += 1023;
1128-@@ -818,87 +803,82 @@ Ftp::Gateway::htmlifyListEntry(const char *line)
1129- parts->showname = xstrdup(parts->name);
1130-
1131- /* {icon} {text} . . . {date}{size}{chdir}{view}{download}{link}\n */
1132-- xstrncpy(href, rfc1738_escape_part(parts->name), 2048);
1133-+ SBuf href(prefix);
1134-+ href.append(rfc1738_escape_part(parts->name));
1135-
1136-- xstrncpy(text, parts->showname, 2048);
1137-+ SBuf text(parts->showname);
1138-
1139-+ SBuf icon, size, chdir, link;
1140- switch (parts->type) {
1141-
1142- case 'd':
1143-- snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
1144-- mimeGetIconURL("internal-dir"),
1145-- "[DIR]");
1146-- strcat(href, "/"); /* margin is allocated above */
1147-+ icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
1148-+ mimeGetIconURL("internal-dir"),
1149-+ "[DIR]");
1150-+ href.append("/", 1); /* margin is allocated above */
1151- break;
1152-
1153- case 'l':
1154-- snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
1155-- mimeGetIconURL("internal-link"),
1156-- "[LINK]");
1157-+ icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
1158-+ mimeGetIconURL("internal-link"),
1159-+ "[LINK]");
1160- /* sometimes there is an 'l' flag, but no "->" link */
1161-
1162- if (parts->link) {
1163-- char *link2 = xstrdup(html_quote(rfc1738_escape(parts->link)));
1164-- snprintf(link, 2048, " -&gt; <a href=\"%s%s\">%s</a>",
1165-- *link2 != '/' ? prefix : "", link2,
1166-- html_quote(parts->link));
1167-- safe_free(link2);
1168-+ SBuf link2(html_quote(rfc1738_escape(parts->link)));
1169-+ link.appendf(" -&gt; <a href=\"%s" SQUIDSBUFPH "\">%s</a>",
1170-+ link2[0] != '/' ? prefix.c_str() : "", SQUIDSBUFPRINT(link2),
1171-+ html_quote(parts->link));
1172- }
1173-
1174- break;
1175-
1176- case '\0':
1177-- snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
1178-- mimeGetIconURL(parts->name),
1179-- "[UNKNOWN]");
1180-- snprintf(chdir, 2048, "<a href=\"%s/;type=d\"><img border=\"0\" src=\"%s\" "
1181-- "alt=\"[DIR]\"></a>",
1182-- rfc1738_escape_part(parts->name),
1183-- mimeGetIconURL("internal-dir"));
1184-+ icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
1185-+ mimeGetIconURL(parts->name),
1186-+ "[UNKNOWN]");
1187-+ chdir.appendf("<a href=\"%s/;type=d\"><img border=\"0\" src=\"%s\" "
1188-+ "alt=\"[DIR]\"></a>",
1189-+ rfc1738_escape_part(parts->name),
1190-+ mimeGetIconURL("internal-dir"));
1191- break;
1192-
1193- case '-':
1194-
1195- default:
1196-- snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
1197-- mimeGetIconURL(parts->name),
1198-- "[FILE]");
1199-- snprintf(size, 2048, " %6" PRId64 "k", parts->size);
1200-+ icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
1201-+ mimeGetIconURL(parts->name),
1202-+ "[FILE]");
1203-+ size.appendf(" %6" PRId64 "k", parts->size);
1204- break;
1205- }
1206-
1207-+ SBuf view, download;
1208- if (parts->type != 'd') {
1209- if (mimeGetViewOption(parts->name)) {
1210-- snprintf(view, 2048, "<a href=\"%s%s;type=a\"><img border=\"0\" src=\"%s\" "
1211-- "alt=\"[VIEW]\"></a>",
1212-- prefix, href, mimeGetIconURL("internal-view"));
1213-+ view.appendf("<a href=\"" SQUIDSBUFPH ";type=a\"><img border=\"0\" src=\"%s\" "
1214-+ "alt=\"[VIEW]\"></a>",
1215-+ SQUIDSBUFPRINT(href), mimeGetIconURL("internal-view"));
1216- }
1217-
1218- if (mimeGetDownloadOption(parts->name)) {
1219-- snprintf(download, 2048, "<a href=\"%s%s;type=i\"><img border=\"0\" src=\"%s\" "
1220-- "alt=\"[DOWNLOAD]\"></a>",
1221-- prefix, href, mimeGetIconURL("internal-download"));
1222-+ download.appendf("<a href=\"" SQUIDSBUFPH ";type=i\"><img border=\"0\" src=\"%s\" "
1223-+ "alt=\"[DOWNLOAD]\"></a>",
1224-+ SQUIDSBUFPRINT(href), mimeGetIconURL("internal-download"));
1225- }
1226- }
1227-
1228- /* construct the table row from parts. */
1229-- html = new MemBuf();
1230-- html->init();
1231-- html->appendf("<tr class=\"entry\">"
1232-- "<td class=\"icon\"><a href=\"%s%s\">%s</a></td>"
1233-- "<td class=\"filename\"><a href=\"%s%s\">%s</a></td>"
1234-- "<td class=\"date\">%s</td>"
1235-- "<td class=\"size\">%s</td>"
1236-- "<td class=\"actions\">%s%s%s%s</td>"
1237-- "</tr>\n",
1238-- prefix, href, icon,
1239-- prefix, href, html_quote(text),
1240-- parts->date,
1241-- size,
1242-- chdir, view, download, link);
1243-+ html << "<tr class=\"entry\">"
1244-+ "<td class=\"icon\"><a href=\"" << href << "\">" << icon << "</a></td>"
1245-+ "<td class=\"filename\"><a href=\"" << href << "\">" << html_quote(text.c_str()) << "</a></td>"
1246-+ "<td class=\"date\">" << parts->date << "</td>"
1247-+ "<td class=\"size\">" << size << "</td>"
1248-+ "<td class=\"actions\">" << chdir << view << download << link << "</td>"
1249-+ "</tr>\n";
1250-
1251- ftpListPartsFree(&parts);
1252-- return html;
1253-+ return true;
1254- }
1255-
1256- void
1257-@@ -909,7 +889,6 @@ Ftp::Gateway::parseListing()
1258- char *end;
1259- char *line;
1260- char *s;
1261-- MemBuf *t;
1262- size_t linelen;
1263- size_t usable;
1264- size_t len = data.readBuf->contentSize();
1265-@@ -969,12 +948,14 @@ Ftp::Gateway::parseListing()
1266- if (!strncmp(line, "total", 5))
1267- continue;
1268-
1269-- t = htmlifyListEntry(line);
1270-+ MemBuf htmlPage;
1271-+ htmlPage.init();
1272-+ PackableStream html(htmlPage);
1273-
1274-- if ( t != NULL) {
1275-- debugs(9, 7, HERE << "listing append: t = {" << t->contentSize() << ", '" << t->content() << "'}");
1276-- listing.append(t->content(), t->contentSize());
1277-- delete t;
1278-+ if (htmlifyListEntry(line, html)) {
1279-+ html.flush();
1280-+ debugs(9, 7, "listing append: t = {" << htmlPage.contentSize() << ", '" << htmlPage.content() << "'}");
1281-+ listing.append(htmlPage.content(), htmlPage.contentSize());
1282- }
1283- }
1284-
1285-diff --git a/src/debug.cc b/src/debug.cc
1286-index 82ae6156..34bcf3fd 100644
1287---- a/src/debug.cc
1288-+++ b/src/debug.cc
1289-@@ -572,23 +572,27 @@ debugLogTime(void)
1290- time_t t = getCurrentTime();
1291-
1292- struct tm *tm;
1293-- static char buf[128];
1294-+ static char buf[128]; // arbitrary size, big enough for the below timestamp strings.
1295- static time_t last_t = 0;
1296-
1297- if (Debug::Level() > 1) {
1298-- char buf2[128];
1299-+ // 4 bytes smaller than buf to ensure .NNN catenation by snprintf()
1300-+ // is safe and works even if strftime() fills its buffer.
1301-+ char buf2[sizeof(buf)-4];
1302- tm = localtime(&t);
1303-- strftime(buf2, 127, "%Y/%m/%d %H:%M:%S", tm);
1304-- buf2[127] = '\0';
1305-- snprintf(buf, 127, "%s.%03d", buf2, (int) current_time.tv_usec / 1000);
1306-+ strftime(buf2, sizeof(buf2), "%Y/%m/%d %H:%M:%S", tm);
1307-+ buf2[sizeof(buf2)-1] = '\0';
1308-+ const int sz = snprintf(buf, sizeof(buf), "%s.%03d", buf2, static_cast<int>(current_time.tv_usec / 1000));
1309-+ assert(0 < sz && sz < static_cast<int>(sizeof(buf)));
1310- last_t = t;
1311- } else if (t != last_t) {
1312- tm = localtime(&t);
1313-- strftime(buf, 127, "%Y/%m/%d %H:%M:%S", tm);
1314-+ const int sz = strftime(buf, sizeof(buf), "%Y/%m/%d %H:%M:%S", tm);
1315-+ assert(0 < sz && sz <= static_cast<int>(sizeof(buf)));
1316- last_t = t;
1317- }
1318-
1319-- buf[127] = '\0';
1320-+ buf[sizeof(buf)-1] = '\0';
1321- return buf;
1322- }
1323-
1324-diff --git a/src/dlink.h b/src/dlink.h
1325-index e242064d..c8e34fe7 100644
1326---- a/src/dlink.h
1327-+++ b/src/dlink.h
1328-@@ -15,20 +15,16 @@ class dlink_node
1329- {
1330- MEMPROXY_CLASS(dlink_node);
1331- public:
1332-- dlink_node() : data(nullptr), prev(nullptr), next(nullptr) {}
1333--
1334-- void *data;
1335-- dlink_node *prev;
1336-- dlink_node *next;
1337-+ void *data = nullptr;
1338-+ dlink_node *prev = nullptr;
1339-+ dlink_node *next = nullptr;
1340- };
1341-
1342- class dlink_list
1343- {
1344- public:
1345-- dlink_list() : head(NULL), tail(NULL) {}
1346--
1347-- dlink_node *head;
1348-- dlink_node *tail;
1349-+ dlink_node *head = nullptr;
1350-+ dlink_node *tail = nullptr;
1351- };
1352-
1353- extern dlink_list ClientActiveRequests;
1354-diff --git a/src/dns_internal.cc b/src/dns_internal.cc
1355-index 9ed20fdd..124c03c1 100644
1356---- a/src/dns_internal.cc
1357-+++ b/src/dns_internal.cc
1358-@@ -96,8 +96,6 @@ static const char *Rcodes[] = {
1359- "Bad OPT Version or TSIG Signature Failure"
1360- };
1361-
1362--typedef struct _ns ns;
1363--
1364- typedef struct _sp sp;
1365-
1366- class idns_query
1367-@@ -125,7 +123,6 @@ public:
1368- ancount(0),
1369- error(NULL)
1370- {
1371-- memset(&hash, 0, sizeof(hash));
1372- memset(&query, 0, sizeof(query));
1373- *buf = 0;
1374- *name = 0;
1375-@@ -185,29 +182,31 @@ class nsvc
1376- CBDATA_CLASS(nsvc);
1377-
1378- public:
1379-- explicit nsvc(int nsv) : ns(nsv), msglen(0), read_msglen(0), msg(new MemBuf()), queue(new MemBuf()), busy(true) {}
1380-+ explicit nsvc(size_t nsv) : ns(nsv), msg(new MemBuf()), queue(new MemBuf()) {}
1381- ~nsvc();
1382-
1383-- int ns;
1384-+ size_t ns = 0;
1385- Comm::ConnectionPointer conn;
1386-- unsigned short msglen;
1387-- int read_msglen;
1388-- MemBuf *msg;
1389-- MemBuf *queue;
1390-- bool busy;
1391-+ unsigned short msglen = 0;
1392-+ int read_msglen = 0;
1393-+ MemBuf *msg = nullptr;
1394-+ MemBuf *queue = nullptr;
1395-+ bool busy = true;
1396- };
1397-
1398- CBDATA_CLASS_INIT(nsvc);
1399-
1400--struct _ns {
1401-+class ns
1402-+{
1403-+public:
1404- Ip::Address S;
1405-- int nqueries;
1406-- int nreplies;
1407-+ int nqueries = 0;
1408-+ int nreplies = 0;
1409- #if WHEN_EDNS_RESPONSES_ARE_PARSED
1410-- int last_seen_edns;
1411-+ int last_seen_edns = 0;
1412- #endif
1413-- bool mDNSResolver;
1414-- nsvc *vc;
1415-+ bool mDNSResolver = false;
1416-+ nsvc *vc = nullptr;
1417- };
1418-
1419- namespace Dns
1420-@@ -231,10 +230,8 @@ struct _sp {
1421- int queries;
1422- };
1423-
1424--static ns *nameservers = NULL;
1425-+static std::vector<ns> nameservers;
1426- static sp *searchpath = NULL;
1427--static int nns = 0;
1428--static int nns_alloc = 0;
1429- static int nns_mdns_count = 0;
1430- static int npc = 0;
1431- static int npc_alloc = 0;
1432-@@ -275,7 +272,6 @@ static OBJH idnsStats;
1433- static void idnsAddNameserver(const char *buf);
1434- static void idnsAddMDNSNameservers();
1435- static void idnsAddPathComponent(const char *buf);
1436--static void idnsFreeNameservers(void);
1437- static void idnsFreeSearchpath(void);
1438- static bool idnsParseNameservers(void);
1439- static bool idnsParseResolvConf(void);
1440-@@ -326,14 +322,14 @@ idnsAddMDNSNameservers()
1441- // mDNS resolver addresses are explicit multicast group IPs
1442- if (Ip::EnableIpv6) {
1443- idnsAddNameserver("FF02::FB");
1444-- nameservers[nns-1].S.port(5353);
1445-- nameservers[nns-1].mDNSResolver = true;
1446-+ nameservers.back().S.port(5353);
1447-+ nameservers.back().mDNSResolver = true;
1448- ++nns_mdns_count;
1449- }
1450-
1451- idnsAddNameserver("224.0.0.251");
1452-- nameservers[nns-1].S.port(5353);
1453-- nameservers[nns-1].mDNSResolver = true;
1454-+ nameservers.back().S.port(5353);
1455-+ nameservers.back().mDNSResolver = true;
1456-
1457- ++nns_mdns_count;
1458- }
1459-@@ -359,33 +355,14 @@ idnsAddNameserver(const char *buf)
1460- return;
1461- }
1462-
1463-- if (nns == nns_alloc) {
1464-- int oldalloc = nns_alloc;
1465-- ns *oldptr = nameservers;
1466--
1467-- if (nns_alloc == 0)
1468-- nns_alloc = 2;
1469-- else
1470-- nns_alloc <<= 1;
1471--
1472-- nameservers = (ns *)xcalloc(nns_alloc, sizeof(*nameservers));
1473--
1474-- if (oldptr && oldalloc)
1475-- memcpy(nameservers, oldptr, oldalloc * sizeof(*nameservers));
1476--
1477-- if (oldptr)
1478-- safe_free(oldptr);
1479-- }
1480--
1481-- assert(nns < nns_alloc);
1482-+ nameservers.emplace_back(ns());
1483- A.port(NS_DEFAULTPORT);
1484-- nameservers[nns].S = A;
1485-+ nameservers.back().S = A;
1486- #if WHEN_EDNS_RESPONSES_ARE_PARSED
1487-- nameservers[nns].last_seen_edns = RFC1035_DEFAULT_PACKET_SZ;
1488-+ nameservers.back().last_seen_edns = RFC1035_DEFAULT_PACKET_SZ;
1489- // TODO generate a test packet to probe this NS from EDNS size and ability.
1490- #endif
1491-- debugs(78, 3, "idnsAddNameserver: Added nameserver #" << nns << " (" << A << ")");
1492-- ++nns;
1493-+ debugs(78, 3, "Added nameserver #" << nameservers.size()-1 << " (" << A << ")");
1494- }
1495-
1496- static void
1497-@@ -417,13 +394,6 @@ idnsAddPathComponent(const char *buf)
1498- ++npc;
1499- }
1500-
1501--static void
1502--idnsFreeNameservers(void)
1503--{
1504-- safe_free(nameservers);
1505-- nns = nns_alloc = 0;
1506--}
1507--
1508- static void
1509- idnsFreeSearchpath(void)
1510- {
1511-@@ -778,12 +748,12 @@ idnsStats(StoreEntry * sentry)
1512- storeAppendPrintf(sentry, "IP ADDRESS # QUERIES # REPLIES Type\n");
1513- storeAppendPrintf(sentry, "---------------------------------------------- --------- --------- --------\n");
1514-
1515-- for (i = 0; i < nns; ++i) {
1516-+ for (const auto &server : nameservers) {
1517- storeAppendPrintf(sentry, "%-45s %9d %9d %s\n", /* Let's take the maximum: (15 IPv4/45 IPv6) */
1518-- nameservers[i].S.toStr(buf,MAX_IPSTRLEN),
1519-- nameservers[i].nqueries,
1520-- nameservers[i].nreplies,
1521-- nameservers[i].mDNSResolver?"multicast":"recurse");
1522-+ server.S.toStr(buf,MAX_IPSTRLEN),
1523-+ server.nqueries,
1524-+ server.nreplies,
1525-+ server.mDNSResolver?"multicast":"recurse");
1526- }
1527-
1528- storeAppendPrintf(sentry, "\nRcode Matrix:\n");
1529-@@ -893,7 +863,7 @@ idnsInitVCConnected(const Comm::ConnectionPointer &conn, Comm::Flag status, int,
1530-
1531- if (status != Comm::OK || !conn) {
1532- char buf[MAX_IPSTRLEN] = "";
1533-- if (vc->ns < nns)
1534-+ if (vc->ns < nameservers.size())
1535- nameservers[vc->ns].S.toStr(buf,MAX_IPSTRLEN);
1536- debugs(78, DBG_IMPORTANT, HERE << "Failed to connect to nameserver " << buf << " using TCP.");
1537- return;
1538-@@ -920,15 +890,15 @@ nsvc::~nsvc()
1539- {
1540- delete queue;
1541- delete msg;
1542-- if (ns < nns) // XXX: idnsShutdownAndFreeState may have freed nameservers[]
1543-+ if (ns < nameservers.size()) // XXX: idnsShutdownAndFreeState may have freed nameservers[]
1544- nameservers[ns].vc = NULL;
1545- }
1546-
1547- static void
1548--idnsInitVC(int nsv)
1549-+idnsInitVC(size_t nsv)
1550- {
1551-+ assert(nsv < nameservers.size());
1552- nsvc *vc = new nsvc(nsv);
1553-- assert(nsv < nns);
1554- assert(vc->conn == NULL); // MUST be NULL from the construction process!
1555- nameservers[nsv].vc = vc;
1556-
1557-@@ -950,9 +920,9 @@ idnsInitVC(int nsv)
1558- }
1559-
1560- static void
1561--idnsSendQueryVC(idns_query * q, int nsn)
1562-+idnsSendQueryVC(idns_query * q, size_t nsn)
1563- {
1564-- assert(nsn < nns);
1565-+ assert(nsn < nameservers.size());
1566- if (nameservers[nsn].vc == NULL)
1567- idnsInitVC(nsn);
1568-
1569-@@ -991,7 +961,7 @@ idnsSendQuery(idns_query * q)
1570- return;
1571- }
1572-
1573-- if (nns <= 0) {
1574-+ if (nameservers.empty()) {
1575- debugs(78, DBG_IMPORTANT, "WARNING: idnsSendQuery: Can't send query, no DNS nameservers known!");
1576- return;
1577- }
1578-@@ -1001,14 +971,15 @@ idnsSendQuery(idns_query * q)
1579- assert(q->lru.prev == NULL);
1580-
1581- int x = -1, y = -1;
1582-- int nsn;
1583-+ size_t nsn;
1584-+ const auto nsCount = nameservers.size();
1585-
1586- do {
1587- // only use mDNS resolvers for mDNS compatible queries
1588- if (!q->permit_mdns)
1589-- nsn = nns_mdns_count + q->nsends % (nns-nns_mdns_count);
1590-+ nsn = nns_mdns_count + q->nsends % (nsCount - nns_mdns_count);
1591- else
1592-- nsn = q->nsends % nns;
1593-+ nsn = q->nsends % nsCount;
1594-
1595- if (q->need_vc) {
1596- idnsSendQueryVC(q, nsn);
1597-@@ -1030,7 +1001,7 @@ idnsSendQuery(idns_query * q)
1598- if (x < 0 && nameservers[nsn].S.isIPv4())
1599- debugs(50, DBG_IMPORTANT, MYNAME << "FD " << DnsSocketA << ": sendto: " << xstrerr(xerrno));
1600-
1601-- } while ( (x<0 && y<0) && q->nsends % nns != 0);
1602-+ } while ( (x<0 && y<0) && q->nsends % nsCount != 0);
1603-
1604- if (y > 0) {
1605- fd_bytes(DnsSocketB, y, FD_WRITE);
1606-@@ -1049,9 +1020,7 @@ idnsSendQuery(idns_query * q)
1607- static int
1608- idnsFromKnownNameserver(Ip::Address const &from)
1609- {
1610-- int i;
1611--
1612-- for (i = 0; i < nns; ++i) {
1613-+ for (int i = 0; static_cast<size_t>(i) < nameservers.size(); ++i) {
1614- if (nameservers[i].S != from)
1615- continue;
1616-
1617-@@ -1232,8 +1201,8 @@ idnsGrokReply(const char *buf, size_t sz, int /*from_ns*/)
1618- // the altered NS was limiting the whole group.
1619- max_shared_edns = q->edns_seen;
1620- // may be limited by one of the others still
1621-- for (int i = 0; i < nns; ++i)
1622-- max_shared_edns = min(max_shared_edns, nameservers[i].last_seen_edns);
1623-+ for (const auto &server : nameservers)
1624-+ max_shared_edns = min(max_shared_edns, server.last_seen_edns);
1625- } else {
1626- nameservers[from_ns].last_seen_edns = q->edns_seen;
1627- // maybe reduce the global limit downwards to accomodate this NS
1628-@@ -1435,10 +1404,11 @@ idnsCheckQueue(void *)
1629- idns_query *q;
1630- event_queued = 0;
1631-
1632-- if (0 == nns)
1633-+ if (nameservers.empty())
1634- /* name servers went away; reconfiguring or shutting down */
1635- return;
1636-
1637-+ const auto nsCount = nameservers.size();
1638- for (n = lru_list.tail; n; n = p) {
1639-
1640- p = n->prev;
1641-@@ -1449,7 +1419,7 @@ idnsCheckQueue(void *)
1642- break;
1643-
1644- /* Query timer still running? */
1645-- if ((time_msec_t)tvSubMsec(q->sent_t, current_time) < (Config.Timeout.idns_retransmit * 1 << ((q->nsends - 1) / nns))) {
1646-+ if ((time_msec_t)tvSubMsec(q->sent_t, current_time) < (Config.Timeout.idns_retransmit * 1 << ((q->nsends - 1) / nsCount))) {
1647- dlinkDelete(&q->lru, &lru_list);
1648- q->queue_t = current_time;
1649- dlinkAdd(q, &q->lru, &lru_list);
1650-@@ -1504,7 +1474,7 @@ idnsReadVC(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Fla
1651- return;
1652- }
1653-
1654-- assert(vc->ns < nns);
1655-+ assert(vc->ns < nameservers.size());
1656- debugs(78, 3, HERE << conn << ": received " << vc->msg->contentSize() << " bytes via TCP from " << nameservers[vc->ns].S << ".");
1657-
1658- idnsGrokReply(vc->msg->buf, vc->msg->contentSize(), vc->ns);
1659-@@ -1623,7 +1593,7 @@ Dns::Init(void)
1660- }
1661- }
1662-
1663-- assert(0 == nns);
1664-+ assert(nameservers.empty());
1665- idnsAddMDNSNameservers();
1666- bool nsFound = idnsParseNameservers();
1667-
1668-@@ -1683,15 +1653,15 @@ idnsShutdownAndFreeState(const char *reason)
1669- DnsSocketB = -1;
1670- }
1671-
1672-- for (int i = 0; i < nns; ++i) {
1673-- if (nsvc *vc = nameservers[i].vc) {
1674-+ for (const auto &server : nameservers) {
1675-+ if (const auto vc = server.vc) {
1676- if (Comm::IsConnOpen(vc->conn))
1677- vc->conn->close();
1678- }
1679- }
1680-
1681- // XXX: vcs are not closed/freed yet and may try to access nameservers[]
1682-- idnsFreeNameservers();
1683-+ nameservers.clear();
1684- idnsFreeSearchpath();
1685- }
1686-
1687-@@ -1784,7 +1754,7 @@ idnsALookup(const char *name, IDNSCB * callback, void *data)
1688- q->query_id = idnsQueryID();
1689-
1690- int nd = 0;
1691-- for (unsigned int i = 0; i < nameLength; ++i)
1692-+ for (size_t i = 0; i < nameLength; ++i)
1693- if (name[i] == '.')
1694- ++nd;
1695-
1696-@@ -1871,7 +1841,7 @@ idnsPTRLookup(const Ip::Address &addr, IDNSCB * callback, void *data)
1697- variable_list *
1698- snmp_netDnsFn(variable_list * Var, snint * ErrP)
1699- {
1700-- int i, n = 0;
1701-+ int n = 0;
1702- variable_list *Answer = NULL;
1703- MemBuf tmp;
1704- debugs(49, 5, "snmp_netDnsFn: Processing request: " << snmpDebugOid(Var->name, Var->name_length, tmp));
1705-@@ -1881,8 +1851,8 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP)
1706-
1707- case DNS_REQ:
1708-
1709-- for (i = 0; i < nns; ++i)
1710-- n += nameservers[i].nqueries;
1711-+ for (const auto &server : nameservers)
1712-+ n += server.nqueries;
1713-
1714- Answer = snmp_var_new_integer(Var->name, Var->name_length,
1715- n,
1716-@@ -1891,8 +1861,8 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP)
1717- break;
1718-
1719- case DNS_REP:
1720-- for (i = 0; i < nns; ++i)
1721-- n += nameservers[i].nreplies;
1722-+ for (const auto &server : nameservers)
1723-+ n += server.nreplies;
1724-
1725- Answer = snmp_var_new_integer(Var->name, Var->name_length,
1726- n,
1727-@@ -1902,7 +1872,7 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP)
1728-
1729- case DNS_SERVERS:
1730- Answer = snmp_var_new_integer(Var->name, Var->name_length,
1731-- nns,
1732-+ nameservers.size(),
1733- SMI_COUNTER32);
1734-
1735- break;
1736-diff --git a/src/esi/Element.h b/src/esi/Element.h
1737-index 60fb7348..9859f93a 100644
1738---- a/src/esi/Element.h
1739-+++ b/src/esi/Element.h
1740-@@ -13,6 +13,8 @@
1741- #include "Debug.h"
1742- #include "esi/Segment.h"
1743-
1744-+#include <vector>
1745-+
1746- typedef enum {
1747- ESI_PROCESS_COMPLETE = 0,
1748- ESI_PROCESS_PENDING_WONTFAIL = 1,
1749-@@ -83,5 +85,21 @@ public:
1750- virtual void finish() = 0;
1751- };
1752-
1753-+/// ESI protocol types and operators
1754-+namespace Esi {
1755-+
1756-+/// an ordered set of ESI elements
1757-+typedef std::vector<ESIElement::Pointer> Elements;
1758-+
1759-+} // namespace Esi
1760-+
1761-+/// Call finish() and set to nil the given element. Element may already be nil.
1762-+/// When element is part of a set, use pos to indicate position/ID
1763-+/// for debugging.
1764-+extern void FinishAnElement(ESIElement::Pointer &, int pos = -1);
1765-+
1766-+// for all elements call finish() and set Pointer to nil
1767-+extern void FinishAllElements(Esi::Elements &);
1768-+
1769- #endif /* SQUID_ESIELEMENT_H */
1770-
1771-diff --git a/src/esi/ElementList.h b/src/esi/ElementList.h
1772-deleted file mode 100644
1773-index 278e7a64..00000000
1774---- a/src/esi/ElementList.h
1775-+++ /dev/null
1776-@@ -1,41 +0,0 @@
1777--/*
1778-- * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
1779-- *
1780-- * Squid software is distributed under GPLv2+ license and includes
1781-- * contributions from numerous individuals and organizations.
1782-- * Please see the COPYING and CONTRIBUTORS files for details.
1783-- */
1784--
1785--/* DEBUG: section 86 ESI processing */
1786--
1787--#ifndef SQUID_ELEMENTLIST_H
1788--#define SQUID_ELEMENTLIST_H
1789--
1790--#include "esi/Element.h"
1791--
1792--class ElementList
1793--{
1794--
1795--public:
1796-- ElementList();
1797-- ~ElementList();
1798--
1799-- ESIElement::Pointer &operator[](int);
1800-- ESIElement::Pointer const &operator[](int)const;
1801-- ESIElement::Pointer * elements; /* unprocessed or rendered nodes */
1802-- void pop_front (size_t const);
1803-- void push_back(ESIElement::Pointer &);
1804-- size_t size() const;
1805-- void setNULL (int start, int end);
1806--
1807-- int allocedcount;
1808-- size_t allocedsize;
1809-- int elementcount;
1810--
1811--private:
1812-- ElementList(ElementList const &);
1813-- ElementList &operator=(ElementList const&);
1814--};
1815--
1816--#endif /* SQUID_ELEMENTLIST_H */
1817--
1818-diff --git a/src/esi/Esi.cc b/src/esi/Esi.cc
1819-index 136b2528..36b51c2a 100644
1820---- a/src/esi/Esi.cc
1821-+++ b/src/esi/Esi.cc
1822-@@ -176,7 +176,7 @@ public:
1823- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
1824- void NULLUnChosen();
1825-
1826-- ElementList elements;
1827-+ Esi::Elements elements;
1828- int chosenelement;
1829- ESIElement::Pointer otherwise;
1830- void finish();
1831-@@ -1884,6 +1884,7 @@ esiTry::finish()
1832- esiChoose::~esiChoose()
1833- {
1834- debugs(86, 5, "esiChoose::~esiChoose " << this);
1835-+ FinishAllElements(elements); // finish if not already done
1836- }
1837-
1838- esiChoose::esiChoose(esiTreeParentPtr aParent) :
1839-@@ -1963,35 +1964,38 @@ esiChoose::selectElement()
1840- }
1841- }
1842-
1843-+// TODO: make ESIElement destructor call finish() instead so it is
1844-+// a) only called when an element ref-count is 0, and
1845-+// b) caller can elements.clear() instead of doing this
1846- void
1847--esiChoose::finish()
1848-+FinishAnElement(ESIElement::Pointer &element, int pos)
1849- {
1850-- elements.setNULL(0, elements.size());
1851--
1852-- if (otherwise.getRaw())
1853-- otherwise->finish();
1854--
1855-- otherwise = NULL;
1856-+ if (element)
1857-+ element->finish();
1858-
1859-- parent = NULL;
1860-+ debugs(86, 5, "setting index " << pos << ", pointer " << (void*)element.getRaw() << " to nil");
1861-+ element = nullptr;
1862- }
1863-
1864- void
1865--ElementList::setNULL (int start, int end)
1866-+FinishAllElements(Esi::Elements &elements)
1867- {
1868-- assert (start >= 0 && start <= elementcount);
1869-- assert (end >= 0 && end <= elementcount);
1870-+ int pos = 0;
1871-+ for (auto &element : elements)
1872-+ FinishAnElement(element, pos++);
1873-+}
1874-+
1875-
1876-- for (int loopPosition = start; loopPosition < end; ++loopPosition) {
1877-- if (elements[loopPosition].getRaw())
1878-- elements[loopPosition]->finish();
1879-+void
1880-+esiChoose::finish()
1881-+{
1882-+ FinishAllElements(elements);
1883-
1884-- debugs(86, 5, "esiSequence::NULLElements: Setting index " <<
1885-- loopPosition << ", pointer " <<
1886-- elements[loopPosition].getRaw() << " to NULL");
1887-+ if (otherwise.getRaw())
1888-+ otherwise->finish();
1889-
1890-- elements[loopPosition] = NULL;
1891-- }
1892-+ otherwise = nullptr;
1893-+ parent = nullptr;
1894- }
1895-
1896- void
1897-@@ -2003,11 +2007,14 @@ esiChoose::NULLUnChosen()
1898-
1899- otherwise = NULL;
1900-
1901-- elements.setNULL (0, chosenelement);
1902-+ int pos = 0;
1903-+ for (auto &element : elements) {
1904-+ if (pos != chosenelement)
1905-+ FinishAnElement(element, pos++);
1906-+ }
1907-
1908-- elements.setNULL (chosenelement + 1, elements.size());
1909- } else if (otherwise.getRaw()) {
1910-- elements.setNULL (0, elements.size());
1911-+ FinishAllElements(elements);
1912- }
1913- }
1914-
1915-@@ -2059,7 +2066,7 @@ void
1916- esiChoose::fail(ESIElement * source, char const *anError)
1917- {
1918- checkValidSource (source);
1919-- elements.setNULL (0, elements.size());
1920-+ FinishAllElements(elements);
1921-
1922- if (otherwise.getRaw())
1923- otherwise->finish();
1924-@@ -2138,59 +2145,6 @@ esiChoose::makeUsable(esiTreeParentPtr newParent, ESIVarState &newVarState) cons
1925- return result;
1926- }
1927-
1928--/* ElementList */
1929--ElementList::ElementList () : elements(NULL), allocedcount(0), allocedsize(0), elementcount (0)
1930--{}
1931--
1932--ElementList::~ElementList()
1933--{
1934-- debugs(86, 5, "ElementList::~ElementList " << this);
1935-- setNULL(0, elementcount);
1936--
1937-- if (elements)
1938-- memFreeBuf (allocedsize, elements);
1939--}
1940--
1941--ESIElement::Pointer &
1942--ElementList::operator [] (int index)
1943--{
1944-- return elements[index];
1945--}
1946--
1947--ESIElement::Pointer const &
1948--ElementList::operator [] (int index) const
1949--{
1950-- return elements[index];
1951--}
1952--
1953--void
1954--ElementList::pop_front (size_t const count)
1955--{
1956-- if (!count)
1957-- return;
1958--
1959-- memmove(elements, &elements[count], (elementcount - count) * sizeof (ESIElement::Pointer));
1960--
1961-- elementcount -= count;
1962--}
1963--
1964--void
1965--ElementList::push_back(ESIElement::Pointer &newElement)
1966--{
1967-- elements = (ESIElement::Pointer *)memReallocBuf (elements, ++elementcount * sizeof (ESIElement::Pointer),
1968-- &allocedsize);
1969-- assert (elements);
1970-- allocedcount = elementcount;
1971-- memset(&elements[elementcount - 1], '\0', sizeof (ESIElement::Pointer));
1972-- elements[elementcount - 1] = newElement;
1973--}
1974--
1975--size_t
1976--ElementList::size() const
1977--{
1978-- return elementcount;
1979--}
1980--
1981- /* esiWhen */
1982- esiWhen::esiWhen(esiTreeParentPtr aParent, int attrcount, const char **attr,ESIVarState *aVar) :
1983- esiSequence(aParent),
1984-diff --git a/src/esi/Makefile.am b/src/esi/Makefile.am
1985-index 49c237f4..99d31761 100644
1986---- a/src/esi/Makefile.am
1987-+++ b/src/esi/Makefile.am
1988-@@ -32,7 +32,6 @@ libesi_la_SOURCES = \
1989- Context.h \
1990- $(ESI_PARSER_SOURCES) \
1991- Element.h \
1992-- ElementList.h \
1993- Esi.cc \
1994- Esi.h \
1995- Except.h \
1996-diff --git a/src/esi/Makefile.in b/src/esi/Makefile.in
1997-index 75de069f..56628bf9 100644
1998---- a/src/esi/Makefile.in
1999-+++ b/src/esi/Makefile.in
2000-@@ -173,10 +173,10 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
2001- libesi_la_LIBADD =
2002- am__libesi_la_SOURCES_DIST = Assign.cc Assign.h Attempt.h Context.cc \
2003- Context.h ExpatParser.cc ExpatParser.h Libxml2Parser.cc \
2004-- Libxml2Parser.h Element.h ElementList.h Esi.cc Esi.h Except.h \
2005-- Expression.cc Expression.h Include.cc Include.h Literal.h \
2006-- Module.cc Module.h Parser.cc Parser.h Segment.cc Segment.h \
2007-- Sequence.cc Sequence.h Var.h VarState.cc VarState.h
2008-+ Libxml2Parser.h Element.h Esi.cc Esi.h Except.h Expression.cc \
2009-+ Expression.h Include.cc Include.h Literal.h Module.cc Module.h \
2010-+ Parser.cc Parser.h Segment.cc Segment.h Sequence.cc Sequence.h \
2011-+ Var.h VarState.cc VarState.h
2012- @ENABLE_LIBEXPAT_TRUE@am__objects_1 = ExpatParser.lo
2013- @ENABLE_LIBXML2_TRUE@am__objects_2 = Libxml2Parser.lo
2014- am__objects_3 = $(am__objects_1) $(am__objects_2)
2015-@@ -744,7 +744,6 @@ libesi_la_SOURCES = \
2016- Context.h \
2017- $(ESI_PARSER_SOURCES) \
2018- Element.h \
2019-- ElementList.h \
2020- Esi.cc \
2021- Esi.h \
2022- Except.h \
2023-diff --git a/src/esi/Sequence.cc b/src/esi/Sequence.cc
2024-index deb7295e..5e129197 100644
2025---- a/src/esi/Sequence.cc
2026-+++ b/src/esi/Sequence.cc
2027-@@ -27,6 +27,7 @@ class esiExcept;
2028- esiSequence::~esiSequence ()
2029- {
2030- debugs(86, 5, "esiSequence::~esiSequence " << this);
2031-+ FinishAllElements(elements); // finish if not already done
2032- }
2033-
2034- esiSequence::esiSequence(esiTreeParentPtr aParent, bool incrementalFlag) :
2035-@@ -88,12 +89,13 @@ esiSequence::render(ESISegment::Pointer output)
2036-
2037- for (size_t i = 0; i < processedcount; ++i) {
2038- elements[i]->render(output);
2039-- elements.setNULL(i,i+1);
2040-+ FinishAnElement(elements[i], i);
2041- /* FIXME: pass a ESISegment ** ? */
2042- output = output->tail();
2043- }
2044-
2045-- elements.pop_front (processedcount);
2046-+ // prune completed elements
2047-+ elements.erase(elements.begin(), elements.begin() + processedcount);
2048- processedcount = 0;
2049- assert (output->next == NULL);
2050- }
2051-@@ -102,7 +104,7 @@ void
2052- esiSequence::finish()
2053- {
2054- debugs(86, 5, "esiSequence::finish: " << this << " is finished");
2055-- elements.setNULL(0, elements.size());
2056-+ FinishAllElements(elements);
2057- parent = NULL;
2058- }
2059-
2060-@@ -126,7 +128,7 @@ esiSequence::provideData (ESISegment::Pointer data, ESIElement *source)
2061- assert (index >= 0);
2062-
2063- /* remove the current node */
2064-- elements.setNULL(index, index+1);
2065-+ FinishAnElement(elements[index], index);
2066-
2067- /* create a literal */
2068- esiLiteral *temp = new esiLiteral (data);
2069-@@ -267,7 +269,7 @@ esiSequence::process (int inheritedVarsFlag)
2070- return processingResult;
2071-
2072- if (processingResult == ESI_PROCESS_FAILED) {
2073-- elements.setNULL (0, elements.size());
2074-+ FinishAllElements(elements);
2075- failed = true;
2076- parent = NULL;
2077- processing = false;
2078-@@ -313,7 +315,7 @@ esiSequence::fail (ESIElement *source, char const *anError)
2079-
2080- debugs(86, 5, "esiSequence::fail: " << this << " has failed.");
2081- parent->fail (this, anError);
2082-- elements.setNULL(0, elements.size());
2083-+ FinishAllElements(elements);
2084- parent = NULL;
2085- }
2086-
2087-diff --git a/src/esi/Sequence.h b/src/esi/Sequence.h
2088-index 81120bed..10c1257a 100644
2089---- a/src/esi/Sequence.h
2090-+++ b/src/esi/Sequence.h
2091-@@ -12,7 +12,6 @@
2092- #define SQUID_ESISEQUENCE_H
2093-
2094- #include "esi/Element.h"
2095--#include "esi/ElementList.h"
2096- #include "mem/forward.h"
2097-
2098- /* esiSequence */
2099-@@ -37,7 +36,7 @@ public:
2100- void makeUsableElements(esiSequence const &old, ESIVarState &);
2101- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
2102-
2103-- ElementList elements; /* unprocessed or rendered nodes */
2104-+ Esi::Elements elements; /* unprocessed or rendered nodes */
2105- size_t processedcount;
2106-
2107- struct {
2108-diff --git a/src/eui/Eui64.h b/src/eui/Eui64.h
2109-index 7f59747b..1ce7c800 100644
2110---- a/src/eui/Eui64.h
2111-+++ b/src/eui/Eui64.h
2112-@@ -36,11 +36,9 @@ class Eui64
2113-
2114- public:
2115- Eui64() { clear(); }
2116-- Eui64(const Eui64 &t) { memcpy(this, &t, sizeof(Eui64)); }
2117-- Eui64& operator= (const Eui64 &t) {memcpy(this, &t, sizeof(Eui64)); return *this;}
2118-+
2119- bool operator== (const Eui64 &t) const { return (memcmp(eui,t.eui,SZ_EUI64_BUF) == 0); }
2120- bool operator< (const Eui64 &t) const { return (memcmp(eui,t.eui,SZ_EUI64_BUF) < 0); }
2121-- ~Eui64() {}
2122-
2123- const unsigned char *get(void);
2124-
2125-diff --git a/src/fqdncache.cc b/src/fqdncache.cc
2126-index b750dbad..7b66dcda 100644
2127---- a/src/fqdncache.cc
2128-+++ b/src/fqdncache.cc
2129-@@ -708,8 +708,7 @@ fqdncache_init(void)
2130- debugs(35, 3, "Initializing FQDN Cache...");
2131-
2132- memset(&FqdncacheStats, '\0', sizeof(FqdncacheStats));
2133--
2134-- memset(&lru_list, '\0', sizeof(lru_list));
2135-+ lru_list = dlink_list();
2136-
2137- fqdncache_high = (long) (((float) Config.fqdncache.size *
2138- (float) FQDN_HIGH_WATER) / (float) 100);
2139-diff --git a/src/fs/rock/RockRebuild.cc b/src/fs/rock/RockRebuild.cc
2140-index 25fe4e71..4bb062ed 100644
2141---- a/src/fs/rock/RockRebuild.cc
2142-+++ b/src/fs/rock/RockRebuild.cc
2143-@@ -213,7 +213,6 @@ Rock::Rebuild::Rebuild(SwapDir *dir): AsyncJob("Rock::Rebuild"),
2144- validationPos(0)
2145- {
2146- assert(sd);
2147-- memset(&counts, 0, sizeof(counts));
2148- dbSize = sd->diskOffsetLimit(); // we do not care about the trailer waste
2149- dbSlotSize = sd->slotSize;
2150- dbEntryLimit = sd->entryLimitActual();
2151-diff --git a/src/fs/ufs/UFSSwapDir.cc b/src/fs/ufs/UFSSwapDir.cc
2152-index 4d70377c..1b63d2f3 100644
2153---- a/src/fs/ufs/UFSSwapDir.cc
2154-+++ b/src/fs/ufs/UFSSwapDir.cc
2155-@@ -45,27 +45,23 @@ class UFSCleanLog : public SwapDir::CleanLog
2156- {
2157-
2158- public:
2159-- UFSCleanLog(SwapDir *);
2160-- /** Get the next entry that is a candidate for clean log writing
2161-- */
2162-+ UFSCleanLog(SwapDir *aSwapDir) : sd(aSwapDir) {}
2163-+
2164-+ /// Get the next entry that is a candidate for clean log writing
2165- virtual const StoreEntry *nextEntry();
2166-- /** "write" an entry to the clean log file.
2167-- */
2168-+
2169-+ /// "write" an entry to the clean log file.
2170- virtual void write(StoreEntry const &);
2171-- char *cur;
2172-- char *newLog;
2173-- char *cln;
2174-- char *outbuf;
2175-- off_t outbuf_offset;
2176-- int fd;
2177-- RemovalPolicyWalker *walker;
2178-- SwapDir *sd;
2179--};
2180-
2181--UFSCleanLog::UFSCleanLog(SwapDir *aSwapDir) :
2182-- cur(NULL), newLog(NULL), cln(NULL), outbuf(NULL),
2183-- outbuf_offset(0), fd(-1),walker(NULL), sd(aSwapDir)
2184--{}
2185-+ SBuf cur;
2186-+ SBuf newLog;
2187-+ SBuf cln;
2188-+ char *outbuf = nullptr;
2189-+ off_t outbuf_offset = 0;
2190-+ int fd = -1;
2191-+ RemovalPolicyWalker *walker = nullptr;
2192-+ SwapDir *sd = nullptr;
2193-+};
2194-
2195- const StoreEntry *
2196- UFSCleanLog::nextEntry()
2197-@@ -106,7 +102,7 @@ UFSCleanLog::write(StoreEntry const &e)
2198- debugs(50, DBG_CRITICAL, MYNAME << "Current swap logfile not replaced.");
2199- file_close(fd);
2200- fd = -1;
2201-- unlink(newLog);
2202-+ unlink(newLog.c_str());
2203- sd->cleanLog = NULL;
2204- delete this;
2205- return;
2206-@@ -686,39 +682,41 @@ Fs::Ufs::UFSSwapDir::createSwapSubDirs()
2207- }
2208- }
2209-
2210--char *
2211-+SBuf
2212- Fs::Ufs::UFSSwapDir::logFile(char const *ext) const
2213- {
2214-- LOCAL_ARRAY(char, lpath, MAXPATHLEN);
2215-- LOCAL_ARRAY(char, pathtmp, MAXPATHLEN);
2216-- LOCAL_ARRAY(char, digit, 32);
2217-- char *pathtmp2;
2218-+ SBuf lpath;
2219-
2220- if (Config.Log.swap) {
2221-- xstrncpy(pathtmp, path, MAXPATHLEN - 64);
2222-- pathtmp2 = pathtmp;
2223-+ static char pathtmp[MAXPATHLEN];
2224-+ char *pathtmp2 = xstrncpy(pathtmp, path, MAXPATHLEN - 64);
2225-
2226-- while ((pathtmp2 = strchr(pathtmp2, '/')) != NULL)
2227-+ // replace all '/' with '.'
2228-+ while ((pathtmp2 = strchr(pathtmp2, '/')))
2229- *pathtmp2 = '.';
2230-
2231-- while (strlen(pathtmp) && pathtmp[strlen(pathtmp) - 1] == '.')
2232-- pathtmp[strlen(pathtmp) - 1] = '\0';
2233-+ // remove any trailing '.' characters
2234-+ int pos = strlen(pathtmp);
2235-+ while (pos && pathtmp[pos-1] == '.')
2236-+ pathtmp[--pos] = '\0';
2237-
2238-+ // remove any prefix '.' characters
2239- for (pathtmp2 = pathtmp; *pathtmp2 == '.'; ++pathtmp2);
2240-- snprintf(lpath, MAXPATHLEN - 64, Config.Log.swap, pathtmp2);
2241--
2242-- if (strncmp(lpath, Config.Log.swap, MAXPATHLEN - 64) == 0) {
2243-- strcat(lpath, ".");
2244-- snprintf(digit, 32, "%02d", index);
2245-- strncat(lpath, digit, 3);
2246-+ // replace a '%s' (if any) in the config string
2247-+ // with the resulting pathtmp2 string
2248-+ lpath.appendf(Config.Log.swap, pathtmp2);
2249-+
2250-+ // is pathtmp2 was NOT injected, append numeric file extension
2251-+ if (lpath.cmp(Config.Log.swap) == 0) {
2252-+ lpath.append(".", 1);
2253-+ lpath.appendf("%02d", index);
2254- }
2255- } else {
2256-- xstrncpy(lpath, path, MAXPATHLEN - 64);
2257-- strcat(lpath, "/swap.state");
2258-+ lpath.append(path);
2259-+ lpath.append("/swap.state", 11);
2260- }
2261-
2262-- if (ext)
2263-- strncat(lpath, ext, 16);
2264-+ lpath.append(ext); // may be nil, that is okay.
2265-
2266- return lpath;
2267- }
2268-@@ -735,9 +733,8 @@ Fs::Ufs::UFSSwapDir::openLog()
2269- return;
2270- }
2271-
2272-- char *logPath;
2273-- logPath = logFile();
2274-- swaplog_fd = file_open(logPath, O_WRONLY | O_CREAT | O_BINARY);
2275-+ SBuf logPath(logFile());
2276-+ swaplog_fd = file_open(logPath.c_str(), O_WRONLY | O_CREAT | O_BINARY);
2277-
2278- if (swaplog_fd < 0) {
2279- int xerrno = errno;
2280-@@ -832,25 +829,23 @@ Fs::Ufs::UFSSwapDir::closeTmpSwapLog()
2281- assert(rebuilding_);
2282- rebuilding_ = false;
2283-
2284-- char *swaplog_path = xstrdup(logFile(NULL)); // where the swaplog should be
2285-- char *tmp_path = xstrdup(logFile(".new")); // the temporary file we have generated
2286-- int fd;
2287-+ SBuf swaplog_path(logFile()); // where the swaplog should be
2288-+ SBuf tmp_path(logFile(".new"));
2289-+
2290- file_close(swaplog_fd);
2291-
2292-- if (xrename(tmp_path, swaplog_path) < 0) {
2293-- fatalf("Failed to rename log file %s to %s", tmp_path, swaplog_path);
2294-+ if (!FileRename(tmp_path, swaplog_path)) {
2295-+ fatalf("Failed to rename log file " SQUIDSBUFPH " to " SQUIDSBUFPH, SQUIDSBUFPRINT(tmp_path), SQUIDSBUFPRINT(swaplog_path));
2296- }
2297-
2298-- fd = file_open(swaplog_path, O_WRONLY | O_CREAT | O_BINARY);
2299-+ int fd = file_open(swaplog_path.c_str(), O_WRONLY | O_CREAT | O_BINARY);
2300-
2301- if (fd < 0) {
2302- int xerrno = errno;
2303- debugs(50, DBG_IMPORTANT, "ERROR: " << swaplog_path << ": " << xstrerr(xerrno));
2304-- fatalf("Failed to open swap log %s", swaplog_path);
2305-+ fatalf("Failed to open swap log " SQUIDSBUFPH, SQUIDSBUFPRINT(swaplog_path));
2306- }
2307-
2308-- xfree(swaplog_path);
2309-- xfree(tmp_path);
2310- swaplog_fd = fd;
2311- debugs(47, 3, "Cache Dir #" << index << " log opened on FD " << fd);
2312- }
2313-@@ -860,21 +855,16 @@ Fs::Ufs::UFSSwapDir::openTmpSwapLog(int *clean_flag, int *zero_flag)
2314- {
2315- assert(!rebuilding_);
2316-
2317-- char *swaplog_path = xstrdup(logFile(NULL));
2318-- char *clean_path = xstrdup(logFile(".last-clean"));
2319-- char *new_path = xstrdup(logFile(".new"));
2320-+ SBuf swaplog_path(logFile());
2321-+ SBuf clean_path(logFile(".last-clean"));
2322-+ SBuf new_path(logFile(".new"));
2323-
2324- struct stat log_sb;
2325-
2326- struct stat clean_sb;
2327-- FILE *fp;
2328-- int fd;
2329-
2330-- if (::stat(swaplog_path, &log_sb) < 0) {
2331-+ if (::stat(swaplog_path.c_str(), &log_sb) < 0) {
2332- debugs(47, DBG_IMPORTANT, "Cache Dir #" << index << ": No log file");
2333-- safe_free(swaplog_path);
2334-- safe_free(clean_path);
2335-- safe_free(new_path);
2336- return NULL;
2337- }
2338-
2339-@@ -885,12 +875,11 @@ Fs::Ufs::UFSSwapDir::openTmpSwapLog(int *clean_flag, int *zero_flag)
2340- file_close(swaplog_fd);
2341-
2342- /* open a write-only FD for the new log */
2343-- fd = file_open(new_path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
2344--
2345-+ int fd = file_open(new_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
2346- if (fd < 0) {
2347- int xerrno = errno;
2348- debugs(50, DBG_IMPORTANT, "ERROR: while opening swap log" << new_path << ": " << xstrerr(xerrno));
2349-- fatalf("Failed to open swap log %s", new_path);
2350-+ fatalf("Failed to open swap log " SQUIDSBUFPH, SQUIDSBUFPRINT(new_path));
2351- }
2352-
2353- swaplog_fd = fd;
2354-@@ -909,30 +898,23 @@ Fs::Ufs::UFSSwapDir::openTmpSwapLog(int *clean_flag, int *zero_flag)
2355- }
2356-
2357- /* open a read-only stream of the old log */
2358-- fp = fopen(swaplog_path, "rb");
2359--
2360-+ FILE *fp = fopen(swaplog_path.c_str(), "rb");
2361- if (!fp) {
2362- int xerrno = errno;
2363- debugs(50, DBG_CRITICAL, "ERROR: while opening " << swaplog_path << ": " << xstrerr(xerrno));
2364-- fatalf("Failed to open swap log for reading %s", swaplog_path);
2365-+ fatalf("Failed to open swap log for reading " SQUIDSBUFPH, SQUIDSBUFPRINT(swaplog_path));
2366- }
2367-
2368- memset(&clean_sb, '\0', sizeof(struct stat));
2369-
2370-- if (::stat(clean_path, &clean_sb) < 0)
2371-+ if (::stat(clean_path.c_str(), &clean_sb) < 0)
2372- *clean_flag = 0;
2373- else if (clean_sb.st_mtime < log_sb.st_mtime)
2374- *clean_flag = 0;
2375- else
2376- *clean_flag = 1;
2377-
2378-- safeunlink(clean_path, 1);
2379--
2380-- safe_free(swaplog_path);
2381--
2382-- safe_free(clean_path);
2383--
2384-- safe_free(new_path);
2385-+ safeunlink(clean_path.c_str(), 1);
2386-
2387- return fp;
2388- }
2389-@@ -953,17 +935,17 @@ Fs::Ufs::UFSSwapDir::writeCleanStart()
2390- #endif
2391-
2392- cleanLog = NULL;
2393-- state->newLog = xstrdup(logFile(".clean"));
2394-- state->fd = file_open(state->newLog, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
2395-+ state->cur = logFile();
2396-+ state->newLog = logFile(".clean");
2397-+ state->fd = file_open(state->newLog.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
2398-
2399- if (state->fd < 0) {
2400-- xfree(state->newLog);
2401- delete state;
2402- return -1;
2403- }
2404-
2405-- state->cur = xstrdup(logFile(NULL));
2406-- state->cln = xstrdup(logFile(".last-clean"));
2407-+ state->cln = state->cur;
2408-+ state->cln.append(".last-clean");
2409- state->outbuf = (char *)xcalloc(CLEAN_BUF_SZ, 1);
2410- state->outbuf_offset = 0;
2411- /*copy the header */
2412-@@ -973,11 +955,11 @@ Fs::Ufs::UFSSwapDir::writeCleanStart()
2413- state->outbuf_offset += header.record_size;
2414-
2415- state->walker = repl->WalkInit(repl);
2416-- ::unlink(state->cln);
2417-+ ::unlink(state->cln.c_str());
2418- debugs(47, 3, HERE << "opened " << state->newLog << ", FD " << state->fd);
2419- #if HAVE_FCHMOD
2420-
2421-- if (::stat(state->cur, &sb) == 0)
2422-+ if (::stat(state->cur.c_str(), &sb) == 0)
2423- fchmod(state->fd, sb.st_mode);
2424-
2425- #endif
2426-@@ -1006,7 +988,7 @@ Fs::Ufs::UFSSwapDir::writeCleanDone()
2427- debugs(50, DBG_CRITICAL, MYNAME << "Current swap logfile not replaced.");
2428- file_close(state->fd);
2429- state->fd = -1;
2430-- ::unlink(state->newLog);
2431-+ ::unlink(state->newLog.c_str());
2432- }
2433-
2434- safe_free(state->outbuf);
2435-@@ -1025,7 +1007,8 @@ Fs::Ufs::UFSSwapDir::writeCleanDone()
2436- state->fd = -1;
2437- #endif
2438-
2439-- xrename(state->newLog, state->cur);
2440-+ FileRename(state->newLog, state->cur);
2441-+ // TODO handle rename errors
2442- }
2443-
2444- /* touch a timestamp file if we're not still validating */
2445-@@ -1034,15 +1017,9 @@ Fs::Ufs::UFSSwapDir::writeCleanDone()
2446- else if (fd < 0)
2447- (void) 0;
2448- else
2449-- file_close(file_open(state->cln, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY));
2450-+ file_close(file_open(state->cln.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY));
2451-
2452- /* close */
2453-- safe_free(state->cur);
2454--
2455-- safe_free(state->newLog);
2456--
2457-- safe_free(state->cln);
2458--
2459- if (state->fd >= 0)
2460- file_close(state->fd);
2461-
2462-@@ -1330,10 +1307,6 @@ int
2463- Fs::Ufs::UFSSwapDir::DirClean(int swap_index)
2464- {
2465- DIR *dir_pointer = NULL;
2466--
2467-- LOCAL_ARRAY(char, p1, MAXPATHLEN + 1);
2468-- LOCAL_ARRAY(char, p2, MAXPATHLEN + 1);
2469--
2470- int files[20];
2471- int swapfileno;
2472- int fn; /* same as swapfileno, but with dirn bits set */
2473-@@ -1350,21 +1323,22 @@ Fs::Ufs::UFSSwapDir::DirClean(int swap_index)
2474- D1 = (swap_index / N0) % N1;
2475- N2 = SD->l2;
2476- D2 = ((swap_index / N0) / N1) % N2;
2477-- snprintf(p1, MAXPATHLEN, "%s/%02X/%02X",
2478-- SD->path, D1, D2);
2479-+
2480-+ SBuf p1;
2481-+ p1.appendf("%s/%02X/%02X", SD->path, D1, D2);
2482- debugs(36, 3, HERE << "Cleaning directory " << p1);
2483-- dir_pointer = opendir(p1);
2484-+ dir_pointer = opendir(p1.c_str());
2485-
2486- if (!dir_pointer) {
2487- int xerrno = errno;
2488- if (xerrno == ENOENT) {
2489- debugs(36, DBG_CRITICAL, MYNAME << "WARNING: Creating " << p1);
2490-- if (mkdir(p1, 0777) == 0)
2491-+ if (mkdir(p1.c_str(), 0777) == 0)
2492- return 0;
2493- }
2494-
2495- debugs(50, DBG_CRITICAL, MYNAME << p1 << ": " << xstrerr(xerrno));
2496-- safeunlink(p1, 1);
2497-+ safeunlink(p1.c_str(), 1);
2498- return 0;
2499- }
2500-
2501-@@ -1396,8 +1370,9 @@ Fs::Ufs::UFSSwapDir::DirClean(int swap_index)
2502-
2503- for (n = 0; n < k; ++n) {
2504- debugs(36, 3, HERE << "Cleaning file "<< std::setfill('0') << std::hex << std::uppercase << std::setw(8) << files[n]);
2505-- snprintf(p2, MAXPATHLEN + 1, "%s/%08X", p1, files[n]);
2506-- safeunlink(p2, 0);
2507-+ SBuf p2(p1);
2508-+ p2.appendf("/%08X", files[n]);
2509-+ safeunlink(p2.c_str(), 0);
2510- ++statCounter.swap.files_cleaned;
2511- }
2512-
2513-diff --git a/src/fs/ufs/UFSSwapDir.h b/src/fs/ufs/UFSSwapDir.h
2514-index f129c447..164cf402 100644
2515---- a/src/fs/ufs/UFSSwapDir.h
2516-+++ b/src/fs/ufs/UFSSwapDir.h
2517-@@ -140,7 +140,7 @@ private:
2518- int createDirectory(const char *path, int);
2519- void createSwapSubDirs();
2520- void dumpEntry(StoreEntry &) const;
2521-- char *logFile(char const *ext = NULL)const;
2522-+ SBuf logFile(char const *ext = nullptr) const;
2523- void changeIO(DiskIOModule *);
2524- bool optionIOParse(char const *option, const char *value, int reconfiguring);
2525- void optionIODump(StoreEntry * e) const;
2526-diff --git a/src/fs_io.cc b/src/fs_io.cc
2527-index 96226c1f..899f2f2b 100644
2528---- a/src/fs_io.cc
2529-+++ b/src/fs_io.cc
2530-@@ -504,26 +504,27 @@ safeunlink(const char *s, int quiet)
2531- }
2532- }
2533-
2534--/*
2535-- * Same as rename(2) but complains if something goes wrong;
2536-- * the caller is responsible for handing and explaining the
2537-- * consequences of errors.
2538-- */
2539--int
2540--xrename(const char *from, const char *to)
2541-+bool
2542-+FileRename(const SBuf &from, const SBuf &to)
2543- {
2544-- debugs(21, 2, "xrename: renaming " << from << " to " << to);
2545-+ debugs(21, 2, "renaming " << from << " to " << to);
2546-+
2547-+ // non-const copy for c_str()
2548-+ SBuf from2(from);
2549-+ // ensure c_str() lifetimes even if `to` and `from` share memory
2550-+ SBuf to2(to.rawContent(), to.length());
2551-+
2552- #if _SQUID_OS2_ || _SQUID_WINDOWS_
2553-- remove(to);
2554-+ remove(to2.c_str());
2555- #endif
2556-
2557-- if (0 == rename(from, to))
2558-- return 0;
2559-+ if (rename(from2.c_str(), to2.c_str()) == 0)
2560-+ return true;
2561-
2562- int xerrno = errno;
2563-- debugs(21, errno == ENOENT ? 2 : 1, "xrename: Cannot rename " << from << " to " << to << ": " << xstrerr(xerrno));
2564-+ debugs(21, (errno == ENOENT ? 2 : DBG_IMPORTANT), "Cannot rename " << from << " to " << to << ": " << xstrerr(xerrno));
2565-
2566-- return -1;
2567-+ return false;
2568- }
2569-
2570- int
2571-diff --git a/src/fs_io.h b/src/fs_io.h
2572-index bc051a6b..0abddb71 100644
2573---- a/src/fs_io.h
2574-+++ b/src/fs_io.h
2575-@@ -12,6 +12,7 @@
2576- #define SQUID_FS_IO_H_
2577-
2578- #include "mem/forward.h"
2579-+#include "sbuf/forward.h"
2580- #include "typedefs.h" //DRCB, DWCB
2581-
2582- class MemBuf;
2583-@@ -47,7 +48,16 @@ void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
2584- void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
2585- void file_read(int, char *, int, off_t, DRCB *, void *);
2586- void safeunlink(const char *path, int quiet);
2587--int xrename(const char *from, const char *to);
2588-+
2589-+/*
2590-+ * Wrapper for rename(2) which complains if something goes wrong;
2591-+ * the caller is responsible for handing and explaining the
2592-+ * consequences of errors.
2593-+ *
2594-+ * \retval true successful rename
2595-+ * \retval false an error occured
2596-+ */
2597-+bool FileRename(const SBuf &from, const SBuf &to);
2598-
2599- int fsBlockSize(const char *path, int *blksize);
2600- int fsStats(const char *, int *, int *, int *, int *);
2601-diff --git a/src/htcp.cc b/src/htcp.cc
2602-index 3f16aec6..5358fae6 100644
2603---- a/src/htcp.cc
2604-+++ b/src/htcp.cc
2605-@@ -152,18 +152,18 @@ private:
2606- htcpDataHeader *dhdr = nullptr;
2607- };
2608-
2609--class htcpDetail {
2610-+class htcpDetail
2611-+{
2612- MEMPROXY_CLASS(htcpDetail);
2613- public:
2614-- htcpDetail() : resp_hdrs(nullptr), respHdrsSz(0), entity_hdrs(nullptr), entityHdrsSz(0), cache_hdrs(nullptr), cacheHdrsSz(0) {}
2615-- char *resp_hdrs;
2616-- size_t respHdrsSz;
2617-+ char *resp_hdrs = nullptr;
2618-+ size_t respHdrsSz = 0;
2619-
2620-- char *entity_hdrs;
2621-- size_t entityHdrsSz;
2622-+ char *entity_hdrs = nullptr;
2623-+ size_t entityHdrsSz = 0;
2624-
2625-- char *cache_hdrs;
2626-- size_t cacheHdrsSz;
2627-+ char *cache_hdrs = nullptr;
2628-+ size_t cacheHdrsSz = 0;
2629- };
2630-
2631- class htcpStuff
2632-@@ -173,18 +173,14 @@ public:
2633- op(o),
2634- rr(r),
2635- f1(f),
2636-- response(0),
2637-- reason(0),
2638- msg_id(id)
2639-- {
2640-- memset(&D, 0, sizeof(D));
2641-- }
2642-+ {}
2643-
2644-- int op;
2645-- int rr;
2646-- int f1;
2647-- int response;
2648-- int reason;
2649-+ int op = 0;
2650-+ int rr = 0;
2651-+ int f1 = 0;
2652-+ int response = 0;
2653-+ int reason = 0;
2654- uint32_t msg_id;
2655- htcpSpecifier S;
2656- htcpDetail D;
2657-@@ -1439,7 +1435,6 @@ htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p)
2658- return 0;
2659-
2660- old_squid_format = p->options.htcp_oldsquid;
2661-- memset(&flags, '\0', sizeof(flags));
2662- snprintf(vbuf, sizeof(vbuf), "%d/%d",
2663- req->http_ver.major, req->http_ver.minor);
2664-
2665-@@ -1489,7 +1484,6 @@ htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestM
2666- return;
2667-
2668- old_squid_format = p->options.htcp_oldsquid;
2669-- memset(&flags, '\0', sizeof(flags));
2670- snprintf(vbuf, sizeof(vbuf), "%d/%d",
2671- req->http_ver.major, req->http_ver.minor);
2672-
2673-diff --git a/src/icmp/Icmp.h b/src/icmp/Icmp.h
2674-index 4ef77de0..cb33f9c0 100644
2675---- a/src/icmp/Icmp.h
2676-+++ b/src/icmp/Icmp.h
2677-@@ -22,20 +22,23 @@
2678- #if USE_ICMP
2679-
2680- /* This is a line-data format struct. DO NOT alter. */
2681--struct pingerEchoData {
2682-+struct pingerEchoData
2683-+{
2684-+ pingerEchoData() { memset(&payload, 0, sizeof(payload)); }
2685- Ip::Address to;
2686-- unsigned char opcode;
2687-- int psize;
2688-+ unsigned char opcode = '\0';
2689-+ int psize = 0;
2690- char payload[PINGER_PAYLOAD_SZ];
2691- };
2692-
2693- /* This is a line-data format struct. DO NOT alter. */
2694- struct pingerReplyData {
2695-+ pingerReplyData() { memset(&payload, 0, sizeof(payload)); }
2696- Ip::Address from;
2697-- unsigned char opcode;
2698-- int rtt;
2699-- int hops;
2700-- int psize;
2701-+ unsigned char opcode = '\0';
2702-+ int rtt = 0;
2703-+ int hops = 0;
2704-+ int psize = 0;
2705- char payload[PINGER_PAYLOAD_SZ];
2706- };
2707-
2708-@@ -65,7 +68,7 @@ class Icmp
2709- {
2710- public:
2711- Icmp();
2712-- virtual ~Icmp() {};
2713-+ virtual ~Icmp() {}
2714-
2715- /// Start pinger helper and initiate control channel
2716- virtual int Open() =0;
2717-diff --git a/src/icmp/IcmpPinger.cc b/src/icmp/IcmpPinger.cc
2718-index 0be1798f..1a0347db 100644
2719---- a/src/icmp/IcmpPinger.cc
2720-+++ b/src/icmp/IcmpPinger.cc
2721-@@ -166,7 +166,7 @@ IcmpPinger::Recv(void)
2722- int n;
2723- int guess_size;
2724-
2725-- memset(&pecho, '\0', sizeof(pecho));
2726-+ pecho = pingerEchoData();
2727- n = recv(socket_from_squid, &pecho, sizeof(pecho), 0);
2728-
2729- if (n < 0) {
2730-diff --git a/src/icmp/IcmpSquid.cc b/src/icmp/IcmpSquid.cc
2731-index ec31a733..a4544706 100644
2732---- a/src/icmp/IcmpSquid.cc
2733-+++ b/src/icmp/IcmpSquid.cc
2734-@@ -125,7 +125,6 @@ IcmpSquid::Recv()
2735- static Ip::Address F;
2736-
2737- Comm::SetSelect(icmp_sock, COMM_SELECT_READ, icmpSquidRecv, NULL, 0);
2738-- memset(&preply, '\0', sizeof(pingerReplyData));
2739- n = comm_udp_recv(icmp_sock,
2740- (char *) &preply,
2741- sizeof(pingerReplyData),
2742-diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc
2743-index 2ef593cf..3b7dd909 100644
2744---- a/src/icmp/net_db.cc
2745-+++ b/src/icmp/net_db.cc
2746-@@ -591,7 +591,7 @@ netdbReloadState(void)
2747- char *q;
2748- assert(s - buf < l);
2749- *s = '\0';
2750-- memset(&N, '\0', sizeof(netdbEntry));
2751-+ N = netdbEntry();
2752- q = strtok(t, w_space);
2753- t = s + 1;
2754-
2755-diff --git a/src/ident/Ident.cc b/src/ident/Ident.cc
2756-index aa514ba2..fbfd5d95 100644
2757---- a/src/ident/Ident.cc
2758-+++ b/src/ident/Ident.cc
2759-@@ -239,11 +239,13 @@ Ident::Start(const Comm::ConnectionPointer &conn, IDCB * callback, void *data)
2760- IdentStateData *state;
2761- char key1[IDENT_KEY_SZ];
2762- char key2[IDENT_KEY_SZ];
2763-- char key[IDENT_KEY_SZ];
2764-+ char key[IDENT_KEY_SZ*2+2]; // key1 + ',' + key2 + terminator
2765-
2766- conn->local.toUrl(key1, IDENT_KEY_SZ);
2767- conn->remote.toUrl(key2, IDENT_KEY_SZ);
2768-- snprintf(key, IDENT_KEY_SZ, "%s,%s", key1, key2);
2769-+ const auto res = snprintf(key, sizeof(key), "%s,%s", key1, key2);
2770-+ assert(res > 0);
2771-+ assert(static_cast<std::make_unsigned<decltype(res)>::type>(res) < sizeof(key));
2772-
2773- if (!ident_hash) {
2774- Init();
2775-diff --git a/src/ipc/StoreMap.cc b/src/ipc/StoreMap.cc
2776-index 66400105..ba1d4dfe 100644
2777---- a/src/ipc/StoreMap.cc
2778-+++ b/src/ipc/StoreMap.cc
2779-@@ -756,8 +756,6 @@ Ipc::StoreMap::sliceAt(const SliceId sliceId) const
2780-
2781- Ipc::StoreMapAnchor::StoreMapAnchor(): start(0), splicingPoint(-1)
2782- {
2783-- memset(&key, 0, sizeof(key));
2784-- memset(&basics, 0, sizeof(basics));
2785- // keep in sync with rewind()
2786- }
2787-
2788-@@ -815,7 +813,7 @@ Ipc::StoreMapAnchor::rewind()
2789- start = 0;
2790- splicingPoint = -1;
2791- memset(&key, 0, sizeof(key));
2792-- memset(&basics, 0, sizeof(basics));
2793-+ basics.clear();
2794- waitingToBeFreed = false;
2795- writerHalted = false;
2796- // but keep the lock
2797-diff --git a/src/ipc/StoreMap.h b/src/ipc/StoreMap.h
2798-index ce3e9b2c..5d44379b 100644
2799---- a/src/ipc/StoreMap.h
2800-+++ b/src/ipc/StoreMap.h
2801-@@ -82,17 +82,26 @@ public:
2802- // fields marked with [app] can be modified when appending-while-reading
2803- // fields marked with [update] can be modified when updating-while-reading
2804-
2805-- uint64_t key[2]; ///< StoreEntry key
2806-+ uint64_t key[2] = {0, 0}; ///< StoreEntry key
2807-
2808- // STORE_META_STD TLV field from StoreEntry
2809- struct Basics {
2810-- time_t timestamp;
2811-- time_t lastref;
2812-- time_t expires;
2813-- time_t lastmod;
2814-+ void clear() {
2815-+ timestamp = 0;
2816-+ lastref = 0;
2817-+ expires = 0;
2818-+ lastmod = 0;
2819-+ swap_file_sz.store(0);
2820-+ refcount = 0;
2821-+ flags = 0;
2822-+ }
2823-+ time_t timestamp = 0;
2824-+ time_t lastref = 0;
2825-+ time_t expires = 0;
2826-+ time_t lastmod = 0;
2827- std::atomic<uint64_t> swap_file_sz; // [app]
2828-- uint16_t refcount;
2829-- uint16_t flags;
2830-+ uint16_t refcount = 0;
2831-+ uint16_t flags = 0;
2832- } basics;
2833-
2834- /// where the chain of StoreEntry slices begins [app]
2835-diff --git a/src/ipc/TypedMsgHdr.cc b/src/ipc/TypedMsgHdr.cc
2836-index f89a8da9..68bc2eed 100644
2837---- a/src/ipc/TypedMsgHdr.cc
2838-+++ b/src/ipc/TypedMsgHdr.cc
2839-@@ -18,25 +18,42 @@
2840-
2841- Ipc::TypedMsgHdr::TypedMsgHdr()
2842- {
2843-- memset(this, 0, sizeof(*this));
2844-+ clear();
2845- sync();
2846- }
2847-
2848- Ipc::TypedMsgHdr::TypedMsgHdr(const TypedMsgHdr &tmh)
2849- {
2850-- memcpy(this, &tmh, sizeof(*this));
2851-- sync();
2852-+ clear();
2853-+ operator =(tmh);
2854- }
2855-
2856- Ipc::TypedMsgHdr &Ipc::TypedMsgHdr::operator =(const TypedMsgHdr &tmh)
2857- {
2858- if (this != &tmh) { // skip assignment to self
2859-- memcpy(this, &tmh, sizeof(*this));
2860-+ memcpy(static_cast<msghdr*>(this), static_cast<const msghdr*>(&tmh), sizeof(msghdr));
2861-+ // struct name is handled in sync()
2862-+ // struct ios[] is handled in sync()
2863-+ data = tmh.data;
2864-+ ctrl = tmh.ctrl;
2865-+ offset = tmh.offset;
2866- sync();
2867- }
2868- return *this;
2869- }
2870-
2871-+void
2872-+Ipc::TypedMsgHdr::clear()
2873-+{
2874-+ // may be called from the constructor, with object fields uninitialized
2875-+ memset(static_cast<msghdr*>(this), 0, sizeof(msghdr));
2876-+ memset(&name, 0, sizeof(name));
2877-+ memset(&ios, 0, sizeof(ios));
2878-+ data = DataBuffer();
2879-+ ctrl = CtrlBuffer();
2880-+ offset = 0;
2881-+}
2882-+
2883- // update msghdr and ios pointers based on msghdr counters
2884- void Ipc::TypedMsgHdr::sync()
2885- {
2886-@@ -223,7 +240,9 @@ Ipc::TypedMsgHdr::getFd() const
2887- void
2888- Ipc::TypedMsgHdr::prepForReading()
2889- {
2890-- memset(this, 0, sizeof(*this));
2891-+ clear();
2892-+ // no sync() like other clear() calls because the
2893-+ // alloc*() below "sync()" the parts they allocate.
2894- allocName();
2895- allocData();
2896- allocControl();
2897-diff --git a/src/ipc/TypedMsgHdr.h b/src/ipc/TypedMsgHdr.h
2898-index 995262e1..40df5f22 100644
2899---- a/src/ipc/TypedMsgHdr.h
2900-+++ b/src/ipc/TypedMsgHdr.h
2901-@@ -74,6 +74,7 @@ public:
2902- size_t size() const { return sizeof(*this); } ///< not true message size
2903-
2904- private:
2905-+ void clear();
2906- void sync();
2907- void allocData();
2908- void allocName();
2909-@@ -89,18 +90,22 @@ private:
2910- struct iovec ios[1]; ///< same as .msg_iov[]
2911-
2912- struct DataBuffer {
2913-- int type_; ///< Message kind, uses MessageType values
2914-- size_t size; ///< actual raw data size (for sanity checks)
2915-+ DataBuffer() { memset(raw, 0, sizeof(raw)); }
2916-+
2917-+ int type_ = 0; ///< Message kind, uses MessageType values
2918-+ size_t size = 0; ///< actual raw data size (for sanity checks)
2919- char raw[maxSize]; ///< buffer with type-specific data
2920- } data; ///< same as .msg_iov[0].iov_base
2921-
2922- struct CtrlBuffer {
2923-+ CtrlBuffer() { memset(raw, 0, sizeof(raw)); }
2924-+
2925- /// control buffer space for one fd
2926- char raw[SQUID_CMSG_SPACE(sizeof(int))];
2927- } ctrl; ///< same as .msg_control
2928-
2929- /// data offset for the next get/put*() to start with
2930-- mutable unsigned int offset;
2931-+ mutable unsigned int offset = 0;
2932- };
2933-
2934- } // namespace Ipc
2935-diff --git a/src/ipcache.cc b/src/ipcache.cc
2936-index b82fba24..95afb5eb 100644
2937---- a/src/ipcache.cc
2938-+++ b/src/ipcache.cc
2939-@@ -575,8 +575,8 @@ ipcache_init(void)
2940- int n;
2941- debugs(14, DBG_IMPORTANT, "Initializing IP Cache...");
2942- memset(&IpcacheStats, '\0', sizeof(IpcacheStats));
2943-- memset(&lru_list, '\0', sizeof(lru_list));
2944-- memset(&static_addrs, '\0', sizeof(ipcache_addrs));
2945-+ lru_list = dlink_list();
2946-+ static_addrs = ipcache_addrs();
2947-
2948- static_addrs.in_addrs = static_cast<Ip::Address *>(xcalloc(1, sizeof(Ip::Address)));
2949- static_addrs.in_addrs->setEmpty(); // properly setup the Ip::Address!
2950-diff --git a/src/log/ModStdio.cc b/src/log/ModStdio.cc
2951-index 32a0af70..5e613ca4 100644
2952---- a/src/log/ModStdio.cc
2953-+++ b/src/log/ModStdio.cc
2954-@@ -106,8 +106,6 @@ logfile_mod_stdio_rotate(Logfile * lf, const int16_t nRotate)
2955- struct stat sb;
2956- #endif
2957-
2958-- char from[MAXPATHLEN];
2959-- char to[MAXPATHLEN];
2960- l_stdio_t *ll = (l_stdio_t *) lf->data;
2961- const char *realpath = lf->path+6; // skip 'stdio:' prefix.
2962- assert(realpath);
2963-@@ -122,12 +120,17 @@ logfile_mod_stdio_rotate(Logfile * lf, const int16_t nRotate)
2964-
2965- debugs(0, DBG_IMPORTANT, "Rotate log file " << lf->path);
2966-
2967-+ SBuf basePath(realpath);
2968-+
2969- /* Rotate numbers 0 through N up one */
2970- for (int16_t i = nRotate; i > 1;) {
2971- --i;
2972-- snprintf(from, MAXPATHLEN, "%s.%d", realpath, i - 1);
2973-- snprintf(to, MAXPATHLEN, "%s.%d", realpath, i);
2974-- xrename(from, to);
2975-+ SBuf from(basePath);
2976-+ from.appendf(".%d", i-1);
2977-+ SBuf to(basePath);
2978-+ to.appendf(".%d", i);
2979-+ FileRename(from, to);
2980-+ // TODO handle rename errors
2981- }
2982-
2983- /* Rotate the current log to .0 */
2984-@@ -136,8 +139,10 @@ logfile_mod_stdio_rotate(Logfile * lf, const int16_t nRotate)
2985- file_close(ll->fd); /* always close */
2986-
2987- if (nRotate > 0) {
2988-- snprintf(to, MAXPATHLEN, "%s.%d", realpath, 0);
2989-- xrename(realpath, to);
2990-+ SBuf to(basePath);
2991-+ to.appendf(".0");
2992-+ FileRename(basePath, to);
2993-+ // TODO handle rename errors
2994- }
2995- /* Reopen the log. It may have been renamed "manually" */
2996- ll->fd = file_open(realpath, O_WRONLY | O_CREAT | O_TEXT);
2997-diff --git a/src/neighbors.cc b/src/neighbors.cc
2998-index b943a24d..ce8feeb3 100644
2999---- a/src/neighbors.cc
3000-+++ b/src/neighbors.cc
3001-@@ -1151,14 +1151,6 @@ neighborUp(const CachePeer * p)
3002- return 1;
3003- }
3004-
3005--void
3006--peerNoteDigestGone(CachePeer * p)
3007--{
3008--#if USE_CACHE_DIGESTS
3009-- cbdataReferenceDone(p->digest);
3010--#endif
3011--}
3012--
3013- /// \returns the effective connect timeout for this peer
3014- time_t
3015- peerConnectTimeout(const CachePeer *peer)
3016-diff --git a/src/peer_digest.cc b/src/peer_digest.cc
3017-index 29aee823..36a8705e 100644
3018---- a/src/peer_digest.cc
3019-+++ b/src/peer_digest.cc
3020-@@ -66,23 +66,20 @@ static const time_t GlobDigestReqMinGap = 1 * 60; /* seconds */
3021-
3022- static time_t pd_last_req_time = 0; /* last call to Check */
3023-
3024--/* initialize peer digest */
3025--static void
3026--peerDigestInit(PeerDigest * pd, CachePeer * p)
3027-+PeerDigest::PeerDigest(CachePeer * p)
3028- {
3029-- assert(pd && p);
3030-+ assert(p);
3031-
3032-- memset(pd, 0, sizeof(*pd));
3033- /*
3034- * DPW 2007-04-12
3035- * Lock on to the peer here. The corresponding cbdataReferenceDone()
3036- * is in peerDigestDestroy().
3037- */
3038-- pd->peer = cbdataReference(p);
3039-+ peer = cbdataReference(p);
3040- /* if peer disappears, we will know it's name */
3041-- pd->host = p->host;
3042-+ host = p->host;
3043-
3044-- pd->times.initialized = squid_curtime;
3045-+ times.initialized = squid_curtime;
3046- }
3047-
3048- CBDATA_CLASS_INIT(PeerDigest);
3049-@@ -129,17 +126,22 @@ DigestFetchState::~DigestFetchState()
3050- }
3051-
3052- /* allocate new peer digest, call Init, and lock everything */
3053--PeerDigest *
3054-+void
3055- peerDigestCreate(CachePeer * p)
3056- {
3057-- PeerDigest *pd;
3058- assert(p);
3059-
3060-- pd = new PeerDigest;
3061-- peerDigestInit(pd, p);
3062-+ PeerDigest *pd = new PeerDigest(p);
3063-+
3064-+ // TODO: make CachePeer member a CbcPointer
3065-+ p->digest = cbdataReference(pd);
3066-
3067-- /* XXX This does not look right, and the same thing again in the caller */
3068-- return cbdataReference(pd);
3069-+ // lock a reference to pd again to prevent the PeerDigest
3070-+ // disappearing during peerDigestDestroy() when
3071-+ // cbdataReferenceValidDone is called.
3072-+ // TODO test if it can be moved into peerDigestDestroy() or
3073-+ // if things can break earlier (eg CachePeer death).
3074-+ (void)cbdataReference(pd);
3075- }
3076-
3077- /* call Clean and free/unlock everything */
3078-@@ -152,19 +154,24 @@ peerDigestDestroy(PeerDigest * pd)
3079-
3080- /*
3081- * DPW 2007-04-12
3082-- * We locked the peer in peerDigestInit(), this is
3083-- * where we unlock it. If the peer is still valid,
3084-- * tell it that the digest is gone.
3085-+ * We locked the peer in PeerDigest constructor, this is
3086-+ * where we unlock it.
3087- */
3088-- if (cbdataReferenceValidDone(peerTmp, &p))
3089-- peerNoteDigestGone((CachePeer *)p);
3090--
3091-- delete pd->cd;
3092-- pd->host.clean();
3093-+ if (cbdataReferenceValidDone(peerTmp, &p)) {
3094-+ // we locked the p->digest in peerDigestCreate()
3095-+ // this is where we unlock that
3096-+ cbdataReferenceDone(static_cast<CachePeer *>(p)->digest);
3097-+ }
3098-
3099- delete pd;
3100- }
3101-
3102-+PeerDigest::~PeerDigest()
3103-+{
3104-+ delete cd;
3105-+ // req_result pointer is not owned by us
3106-+}
3107-+
3108- /* called by peer to indicate that somebody actually needs this digest */
3109- void
3110- peerDigestNeeded(PeerDigest * pd)
3111-diff --git a/src/snmp/Pdu.cc b/src/snmp/Pdu.cc
3112-index c77811a7..d71f121d 100644
3113---- a/src/snmp/Pdu.cc
3114-+++ b/src/snmp/Pdu.cc
3115-@@ -45,7 +45,8 @@ Snmp::Pdu::operator = (const Pdu& pdu)
3116- void
3117- Snmp::Pdu::init()
3118- {
3119-- memset(this, 0, sizeof(*this));
3120-+ memset(static_cast<snmp_pdu *>(this), 0, sizeof(snmp_pdu));
3121-+ aggrCount = 0;
3122- errstat = SNMP_DEFAULT_ERRSTAT;
3123- errindex = SNMP_DEFAULT_ERRINDEX;
3124- }
3125-diff --git a/src/snmp/Pdu.h b/src/snmp/Pdu.h
3126-index 24378462..a38ee8c7 100644
3127---- a/src/snmp/Pdu.h
3128-+++ b/src/snmp/Pdu.h
3129-@@ -43,7 +43,7 @@ public:
3130- private:
3131- void init(); ///< initialize members
3132- void assign(const Pdu& pdu); ///< perform full assignment
3133-- unsigned int aggrCount; ///< The number of other Pdus merged into
3134-+ unsigned int aggrCount = 0; ///< The number of other Pdus merged into
3135- };
3136-
3137- } // namespace Snmp
3138-diff --git a/src/snmp/Session.cc b/src/snmp/Session.cc
3139-index 23438ec9..2690989b 100644
3140---- a/src/snmp/Session.cc
3141-+++ b/src/snmp/Session.cc
3142-@@ -14,59 +14,44 @@
3143- #include "snmp/Session.h"
3144- #include "tools.h"
3145-
3146--Snmp::Session::Session()
3147--{
3148-- clear();
3149--}
3150-
3151--Snmp::Session::Session(const Session& session)
3152-+Snmp::Session::Session()
3153- {
3154-- assign(session);
3155-+ memset(static_cast<snmp_session *>(this), 0, sizeof(snmp_session));
3156- }
3157-
3158--Snmp::Session::~Session()
3159-+Snmp::Session::Session(const Snmp::Session& session) : Session()
3160- {
3161-- free();
3162-+ operator =(session);
3163- }
3164-
3165- Snmp::Session&
3166- Snmp::Session::operator = (const Session& session)
3167- {
3168-- free();
3169-- assign(session);
3170-- return *this;
3171--}
3172-+ if (&session == this)
3173-+ return *this;
3174-
3175--void
3176--Snmp::Session::clear()
3177--{
3178-- memset(this, 0, sizeof(*this));
3179-+ reset();
3180-+ memcpy(static_cast<snmp_session *>(this), &session, sizeof(snmp_session));
3181-+ // memcpy did a shallow copy, make sure we have our own allocations
3182-+ if (session.community) {
3183-+ community = (u_char*)xstrdup((char*)session.community);
3184-+ }
3185-+ if (session.peername) {
3186-+ peername = xstrdup(session.peername);
3187-+ }
3188-+ return *this;
3189- }
3190-
3191- void
3192--Snmp::Session::free()
3193-+Snmp::Session::reset()
3194- {
3195- if (community_len > 0) {
3196- Must(community != NULL);
3197- xfree(community);
3198- }
3199-- if (peername != NULL)
3200-- xfree(peername);
3201-- clear();
3202--}
3203--
3204--void
3205--Snmp::Session::assign(const Session& session)
3206--{
3207-- memcpy(this, &session, sizeof(*this));
3208-- if (session.community != NULL) {
3209-- community = (u_char*)xstrdup((char*)session.community);
3210-- Must(community != NULL);
3211-- }
3212-- if (session.peername != NULL) {
3213-- peername = xstrdup(session.peername);
3214-- Must(peername != NULL);
3215-- }
3216-+ xfree(peername);
3217-+ memset(static_cast<snmp_session *>(this), 0, sizeof(snmp_session));
3218- }
3219-
3220- void
3221-@@ -91,7 +76,7 @@ Snmp::Session::pack(Ipc::TypedMsgHdr& msg) const
3222- void
3223- Snmp::Session::unpack(const Ipc::TypedMsgHdr& msg)
3224- {
3225-- free();
3226-+ reset();
3227- msg.getPod(Version);
3228- community_len = msg.getInt();
3229- if (community_len > 0) {
3230-diff --git a/src/snmp/Session.h b/src/snmp/Session.h
3231-index 647934aa..9a42234f 100644
3232---- a/src/snmp/Session.h
3233-+++ b/src/snmp/Session.h
3234-@@ -25,15 +25,13 @@ public:
3235- Session();
3236- Session(const Session& session);
3237- Session& operator = (const Session& session);
3238-- ~Session();
3239-+ ~Session() { reset(); }
3240-
3241- void pack(Ipc::TypedMsgHdr& msg) const; ///< prepare for sendmsg()
3242- void unpack(const Ipc::TypedMsgHdr& msg); ///< restore struct from the message
3243-- void clear(); ///< clear internal members
3244-
3245- private:
3246-- void free(); ///< free internal members
3247-- void assign(const Session& session); ///< perform full assignment
3248-+ void reset(); ///< free internal members
3249- };
3250-
3251- } // namespace Snmp
3252-diff --git a/src/snmp/Var.cc b/src/snmp/Var.cc
3253-index 509bbfcb..b5e82b17 100644
3254---- a/src/snmp/Var.cc
3255-+++ b/src/snmp/Var.cc
3256-@@ -44,7 +44,7 @@ Snmp::Var::operator = (const Var& var)
3257- void
3258- Snmp::Var::init()
3259- {
3260-- memset(this, 0, sizeof(*this));
3261-+ memset(static_cast<variable_list *>(this), 0, sizeof(variable_list));
3262- }
3263-
3264- Snmp::Var&
3265-@@ -156,10 +156,8 @@ Snmp::Var::assign(const Var& var)
3266- void
3267- Snmp::Var::clearName()
3268- {
3269-- if (name != NULL) {
3270-- xfree(name);
3271-- name = NULL;
3272-- }
3273-+ xfree(name);
3274-+ name = nullptr;
3275- name_length = 0;
3276- }
3277-
3278-@@ -183,10 +181,8 @@ Snmp::Var::setName(const Range<const oid*>& aName)
3279- void
3280- Snmp::Var::clearValue()
3281- {
3282-- if (val.string != NULL) {
3283-- xfree(val.string);
3284-- val.string = NULL;
3285-- }
3286-+ xfree(val.string);
3287-+ val.string = nullptr;
3288- val_len = 0;
3289- type = 0;
3290- }
3291-diff --git a/src/ssl/PeekingPeerConnector.cc b/src/ssl/PeekingPeerConnector.cc
3292-index a79a2fff..e448c2dc 100644
3293---- a/src/ssl/PeekingPeerConnector.cc
3294-+++ b/src/ssl/PeekingPeerConnector.cc
3295-@@ -283,11 +283,11 @@ Ssl::PeekingPeerConnector::noteNegotiationError(const int result, const int ssl_
3296- //
3297- if (srvBio->bumpMode() == Ssl::bumpPeek && (resumingSession = srvBio->resumingSession())) {
3298- // we currently splice all resumed sessions unconditionally
3299-- if (const bool spliceResumed = true) {
3300-- bypassCertValidator();
3301-- checkForPeekAndSpliceMatched(Ssl::bumpSplice);
3302-- return;
3303-- } // else fall through to find a matching ssl_bump action (with limited info)
3304-+ // if (const bool spliceResumed = true) {
3305-+ bypassCertValidator();
3306-+ checkForPeekAndSpliceMatched(Ssl::bumpSplice);
3307-+ return;
3308-+ // } // else fall through to find a matching ssl_bump action (with limited info)
3309- }
3310-
3311- // If we are in peek-and-splice mode and still we did not write to
3312-diff --git a/src/stat.cc b/src/stat.cc
3313-index d4e91b5f..e8b71536 100644
3314---- a/src/stat.cc
3315-+++ b/src/stat.cc
3316-@@ -84,10 +84,6 @@ static void statAvgDump(StoreEntry *, int minutes, int hours);
3317- #if STAT_GRAPHS
3318- static void statGraphDump(StoreEntry *);
3319- #endif
3320--static void statCountersInit(StatCounters *);
3321--static void statCountersInitSpecial(StatCounters *);
3322--static void statCountersClean(StatCounters *);
3323--static void statCountersCopy(StatCounters * dest, const StatCounters * orig);
3324- static double statPctileSvc(double, int, int);
3325- static void statStoreEntry(MemBuf * mb, StoreEntry * e);
3326- static double statCPUUsage(int minutes);
3327-@@ -1219,6 +1215,45 @@ statRegisterWithCacheManager(void)
3328- #endif
3329- }
3330-
3331-+/* add special cases here as they arrive */
3332-+static void
3333-+statCountersInitSpecial(StatCounters * C)
3334-+{
3335-+ /*
3336-+ * HTTP svc_time hist is kept in milli-seconds; max of 3 hours.
3337-+ */
3338-+ C->client_http.allSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3339-+ C->client_http.missSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3340-+ C->client_http.nearMissSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3341-+ C->client_http.nearHitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3342-+ C->client_http.hitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3343-+ /*
3344-+ * ICP svc_time hist is kept in micro-seconds; max of 1 minute.
3345-+ */
3346-+ C->icp.querySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
3347-+ C->icp.replySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
3348-+ /*
3349-+ * DNS svc_time hist is kept in milli-seconds; max of 10 minutes.
3350-+ */
3351-+ C->dns.svcTime.logInit(300, 0.0, 60000.0 * 10.0);
3352-+ /*
3353-+ * Cache Digest Stuff
3354-+ */
3355-+ C->cd.on_xition_count.enumInit(CacheDigestHashFuncCount);
3356-+ C->comm_udp_incoming.enumInit(INCOMING_UDP_MAX);
3357-+ C->comm_dns_incoming.enumInit(INCOMING_DNS_MAX);
3358-+ C->comm_tcp_incoming.enumInit(INCOMING_TCP_MAX);
3359-+ C->select_fds_hist.enumInit(256); /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
3360-+}
3361-+
3362-+static void
3363-+statCountersInit(StatCounters * C)
3364-+{
3365-+ assert(C);
3366-+ *C = StatCounters();
3367-+ statCountersInitSpecial(C);
3368-+}
3369-+
3370- void
3371- statInit(void)
3372- {
3373-@@ -1245,30 +1280,24 @@ statInit(void)
3374- static void
3375- statAvgTick(void *)
3376- {
3377-- StatCounters *t = &CountHist[0];
3378-- StatCounters *p = &CountHist[1];
3379-- StatCounters *c = &statCounter;
3380--
3381- struct rusage rusage;
3382- eventAdd("statAvgTick", statAvgTick, NULL, (double) COUNT_INTERVAL, 1);
3383- squid_getrusage(&rusage);
3384-- c->page_faults = rusage_pagefaults(&rusage);
3385-- c->cputime = rusage_cputime(&rusage);
3386-- c->timestamp = current_time;
3387-- /* even if NCountHist is small, we already Init()ed the tail */
3388-- statCountersClean(CountHist + N_COUNT_HIST - 1);
3389-- memmove(p, t, (N_COUNT_HIST - 1) * sizeof(StatCounters));
3390-- statCountersCopy(t, c);
3391-+ statCounter.page_faults = rusage_pagefaults(&rusage);
3392-+ statCounter.cputime = rusage_cputime(&rusage);
3393-+ statCounter.timestamp = current_time;
3394-+ // shift all elements right and prepend statCounter
3395-+ for(int i = N_COUNT_HIST-1; i > 0; --i)
3396-+ CountHist[i] = CountHist[i-1];
3397-+ CountHist[0] = statCounter;
3398- ++NCountHist;
3399-
3400- if ((NCountHist % COUNT_INTERVAL) == 0) {
3401- /* we have an hours worth of readings. store previous hour */
3402-- StatCounters *t2 = &CountHourHist[0];
3403-- StatCounters *p2 = &CountHourHist[1];
3404-- StatCounters *c2 = &CountHist[N_COUNT_HIST - 1];
3405-- statCountersClean(CountHourHist + N_COUNT_HOUR_HIST - 1);
3406-- memmove(p2, t2, (N_COUNT_HOUR_HIST - 1) * sizeof(StatCounters));
3407-- statCountersCopy(t2, c2);
3408-+ // shift all elements right and prepend final CountHist element
3409-+ for(int i = N_COUNT_HOUR_HIST-1; i > 0; --i)
3410-+ CountHourHist[i] = CountHourHist[i-1];
3411-+ CountHourHist[0] = CountHist[N_COUNT_HIST - 1];
3412- ++NCountHourHist;
3413- }
3414-
3415-@@ -1302,93 +1331,6 @@ statAvgTick(void *)
3416- }
3417- }
3418-
3419--static void
3420--statCountersInit(StatCounters * C)
3421--{
3422-- assert(C);
3423-- memset(C, 0, sizeof(*C));
3424-- C->timestamp = current_time;
3425-- statCountersInitSpecial(C);
3426--}
3427--
3428--/* add special cases here as they arrive */
3429--static void
3430--statCountersInitSpecial(StatCounters * C)
3431--{
3432-- /*
3433-- * HTTP svc_time hist is kept in milli-seconds; max of 3 hours.
3434-- */
3435-- C->client_http.allSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3436-- C->client_http.missSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3437-- C->client_http.nearMissSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3438-- C->client_http.nearHitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3439-- C->client_http.hitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3440-- /*
3441-- * ICP svc_time hist is kept in micro-seconds; max of 1 minute.
3442-- */
3443-- C->icp.querySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
3444-- C->icp.replySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
3445-- /*
3446-- * DNS svc_time hist is kept in milli-seconds; max of 10 minutes.
3447-- */
3448-- C->dns.svcTime.logInit(300, 0.0, 60000.0 * 10.0);
3449-- /*
3450-- * Cache Digest Stuff
3451-- */
3452-- C->cd.on_xition_count.enumInit(CacheDigestHashFuncCount);
3453-- C->comm_udp_incoming.enumInit(INCOMING_UDP_MAX);
3454-- C->comm_dns_incoming.enumInit(INCOMING_DNS_MAX);
3455-- C->comm_tcp_incoming.enumInit(INCOMING_TCP_MAX);
3456-- C->select_fds_hist.enumInit(256); /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
3457--}
3458--
3459--/* add special cases here as they arrive */
3460--static void
3461--statCountersClean(StatCounters * C)
3462--{
3463-- assert(C);
3464-- C->client_http.allSvcTime.clear();
3465-- C->client_http.missSvcTime.clear();
3466-- C->client_http.nearMissSvcTime.clear();
3467-- C->client_http.nearHitSvcTime.clear();
3468-- C->client_http.hitSvcTime.clear();
3469-- C->icp.querySvcTime.clear();
3470-- C->icp.replySvcTime.clear();
3471-- C->dns.svcTime.clear();
3472-- C->cd.on_xition_count.clear();
3473-- C->comm_udp_incoming.clear();
3474-- C->comm_dns_incoming.clear();
3475-- C->comm_tcp_incoming.clear();
3476-- C->select_fds_hist.clear();
3477--}
3478--
3479--/* add special cases here as they arrive */
3480--static void
3481--statCountersCopy(StatCounters * dest, const StatCounters * orig)
3482--{
3483-- assert(dest && orig);
3484-- /* this should take care of all the fields, but "special" ones */
3485-- memcpy(dest, orig, sizeof(*dest));
3486-- /* prepare space where to copy special entries */
3487-- statCountersInitSpecial(dest);
3488-- /* now handle special cases */
3489-- /* note: we assert that histogram capacities do not change */
3490-- dest->client_http.allSvcTime=orig->client_http.allSvcTime;
3491-- dest->client_http.missSvcTime=orig->client_http.missSvcTime;
3492-- dest->client_http.nearMissSvcTime=orig->client_http.nearMissSvcTime;
3493-- dest->client_http.nearHitSvcTime=orig->client_http.nearHitSvcTime;
3494--
3495-- dest->client_http.hitSvcTime=orig->client_http.hitSvcTime;
3496-- dest->icp.querySvcTime=orig->icp.querySvcTime;
3497-- dest->icp.replySvcTime=orig->icp.replySvcTime;
3498-- dest->dns.svcTime=orig->dns.svcTime;
3499-- dest->cd.on_xition_count=orig->cd.on_xition_count;
3500-- dest->comm_udp_incoming=orig->comm_udp_incoming;
3501-- dest->comm_dns_incoming=orig->comm_dns_incoming;
3502-- dest->comm_tcp_incoming=orig->comm_tcp_incoming;
3503-- dest->select_fds_hist=orig->select_fds_hist;
3504--}
3505--
3506- static void
3507- statCountersHistograms(StoreEntry * sentry)
3508- {
3509-@@ -1624,13 +1566,12 @@ DumpCountersStats(Mgr::CountersActionData& stats, StoreEntry* sentry)
3510- void
3511- statFreeMemory(void)
3512- {
3513-- int i;
3514-+ // TODO: replace with delete[]
3515-+ for (int i = 0; i < N_COUNT_HIST; ++i)
3516-+ CountHist[i] = StatCounters();
3517-
3518-- for (i = 0; i < N_COUNT_HIST; ++i)
3519-- statCountersClean(&CountHist[i]);
3520--
3521-- for (i = 0; i < N_COUNT_HOUR_HIST; ++i)
3522-- statCountersClean(&CountHourHist[i]);
3523-+ for (int i = 0; i < N_COUNT_HOUR_HIST; ++i)
3524-+ CountHourHist[i] = StatCounters();
3525- }
3526-
3527- static void
3528-diff --git a/src/store/Disks.cc b/src/store/Disks.cc
3529-index b543d844..dd97b3b4 100644
3530---- a/src/store/Disks.cc
3531-+++ b/src/store/Disks.cc
3532-@@ -680,16 +680,18 @@ storeDirWriteCleanLogs(int reopen)
3533- void
3534- allocate_new_swapdir(Store::DiskConfig *swap)
3535- {
3536-- if (swap->swapDirs == NULL) {
3537-+ if (!swap->swapDirs) {
3538- swap->n_allocated = 4;
3539-- swap->swapDirs = static_cast<SwapDir::Pointer *>(xcalloc(swap->n_allocated, sizeof(SwapDir::Pointer)));
3540-+ swap->swapDirs = new SwapDir::Pointer[swap->n_allocated];
3541- }
3542-
3543- if (swap->n_allocated == swap->n_configured) {
3544- swap->n_allocated <<= 1;
3545-- SwapDir::Pointer *const tmp = static_cast<SwapDir::Pointer *>(xcalloc(swap->n_allocated, sizeof(SwapDir::Pointer)));
3546-- memcpy(tmp, swap->swapDirs, swap->n_configured * sizeof(SwapDir *));
3547-- xfree(swap->swapDirs);
3548-+ const auto tmp = new SwapDir::Pointer[swap->n_allocated];
3549-+ for (int i = 0; i < swap->n_configured; ++i) {
3550-+ tmp[i] = swap->swapDirs[i];
3551-+ }
3552-+ delete[] swap->swapDirs;
3553- swap->swapDirs = tmp;
3554- }
3555- }
3556-@@ -697,23 +699,21 @@ allocate_new_swapdir(Store::DiskConfig *swap)
3557- void
3558- free_cachedir(Store::DiskConfig *swap)
3559- {
3560-- int i;
3561- /* DON'T FREE THESE FOR RECONFIGURE */
3562-
3563- if (reconfiguring)
3564- return;
3565-
3566-- for (i = 0; i < swap->n_configured; ++i) {
3567-- /* TODO XXX this lets the swapdir free resources asynchronously
3568-- * swap->swapDirs[i]->deactivate();
3569-- * but there may be such a means already.
3570-- * RBC 20041225
3571-- */
3572-- swap->swapDirs[i] = NULL;
3573-- }
3574-+ /* TODO XXX this lets the swapdir free resources asynchronously
3575-+ * swap->swapDirs[i]->deactivate();
3576-+ * but there may be such a means already.
3577-+ * RBC 20041225
3578-+ */
3579-
3580-- safe_free(swap->swapDirs);
3581-- swap->swapDirs = NULL;
3582-+ // only free's the array memory itself
3583-+ // the SwapDir objects may remain (ref-counted)
3584-+ delete[] swap->swapDirs;
3585-+ swap->swapDirs = nullptr;
3586- swap->n_allocated = 0;
3587- swap->n_configured = 0;
3588- }
3589-diff --git a/src/store_digest.cc b/src/store_digest.cc
3590-index 4ed85215..3b5a31a9 100644
3591---- a/src/store_digest.cc
3592-+++ b/src/store_digest.cc
3593-@@ -43,25 +43,26 @@
3594-
3595- class StoreDigestState
3596- {
3597--
3598- public:
3599- StoreDigestCBlock cblock;
3600-- int rebuild_lock; /* bucket number */
3601-- StoreEntry * rewrite_lock; /* points to store entry with the digest */
3602-+ int rebuild_lock = 0; ///< bucket number
3603-+ StoreEntry * rewrite_lock = nullptr; ///< points to store entry with the digest
3604- StoreSearchPointer theSearch;
3605-- int rewrite_offset;
3606-- int rebuild_count;
3607-- int rewrite_count;
3608-+ int rewrite_offset = 0;
3609-+ int rebuild_count = 0;
3610-+ int rewrite_count = 0;
3611- };
3612-
3613--typedef struct {
3614-- int del_count; /* #store entries deleted from store_digest */
3615-- int del_lost_count; /* #store entries not found in store_digest on delete */
3616-- int add_count; /* #store entries accepted to store_digest */
3617-- int add_coll_count; /* #accepted entries that collided with existing ones */
3618-- int rej_count; /* #store entries not accepted to store_digest */
3619-- int rej_coll_count; /* #not accepted entries that collided with existing ones */
3620--} StoreDigestStats;
3621-+class StoreDigestStats
3622-+{
3623-+public:
3624-+ int del_count = 0; /* #store entries deleted from store_digest */
3625-+ int del_lost_count = 0; /* #store entries not found in store_digest on delete */
3626-+ int add_count = 0; /* #store entries accepted to store_digest */
3627-+ int add_coll_count = 0; /* #accepted entries that collided with existing ones */
3628-+ int rej_count = 0; /* #store entries not accepted to store_digest */
3629-+ int rej_coll_count = 0; /* #not accepted entries that collided with existing ones */
3630-+};
3631-
3632- /* local vars */
3633- static StoreDigestState sd_state;
3634-@@ -139,7 +140,7 @@ storeDigestInit(void)
3635- (int) Config.digest.rebuild_period << "/" <<
3636- (int) Config.digest.rewrite_period << " sec");
3637-
3638-- memset(&sd_state, 0, sizeof(sd_state));
3639-+ sd_state = StoreDigestState();
3640- #else
3641- store_digest = NULL;
3642- debugs(71, 3, "Local cache digest is 'off'");
3643-@@ -355,7 +356,7 @@ storeDigestRebuildResume(void)
3644- if (!storeDigestResize())
3645- store_digest->clear(); /* not clean()! */
3646-
3647-- memset(&sd_stats, 0, sizeof(sd_stats));
3648-+ sd_stats = StoreDigestStats();
3649-
3650- eventAdd("storeDigestRebuildStep", storeDigestRebuildStep, NULL, 0.0, 1);
3651- }
3652-diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc
3653-index d6d0bf94..f4ffadbc 100644
3654---- a/src/store_rebuild.cc
3655-+++ b/src/store_rebuild.cc
3656-@@ -172,7 +172,7 @@ storeRebuildComplete(StoreRebuildData *dc)
3657- void
3658- storeRebuildStart(void)
3659- {
3660-- memset(&counts, '\0', sizeof(counts));
3661-+ counts = StoreRebuildData(); // reset counters
3662- rebuild_start = current_time;
3663- /*
3664- * Note: store_dirs_rebuilding is initialized to 1.
3665-diff --git a/src/store_rebuild.h b/src/store_rebuild.h
3666-index de3056ed..483874f4 100644
3667---- a/src/store_rebuild.h
3668-+++ b/src/store_rebuild.h
3669-@@ -16,22 +16,16 @@
3670- class StoreRebuildData
3671- {
3672- public:
3673-- StoreRebuildData() :
3674-- objcount(0), expcount(0), scancount(0), clashcount(0),
3675-- dupcount(0), cancelcount(0), invalid(0), badflags(0),
3676-- bad_log_op(0), zero_object_sz(0)
3677-- {}
3678--
3679-- int objcount; /* # objects successfully reloaded */
3680-- int expcount; /* # objects expired */
3681-- int scancount; /* # entries scanned or read from state file */
3682-- int clashcount; /* # swapfile clashes avoided */
3683-- int dupcount; /* # duplicates purged */
3684-- int cancelcount; /* # SWAP_LOG_DEL objects purged */
3685-- int invalid; /* # bad lines */
3686-- int badflags; /* # bad e->flags */
3687-- int bad_log_op;
3688-- int zero_object_sz;
3689-+ int objcount = 0; /* # objects successfully reloaded */
3690-+ int expcount = 0; /* # objects expired */
3691-+ int scancount = 0; /* # entries scanned or read from state file */
3692-+ int clashcount = 0; /* # swapfile clashes avoided */
3693-+ int dupcount = 0; /* # duplicates purged */
3694-+ int cancelcount = 0; /* # SWAP_LOG_DEL objects purged */
3695-+ int invalid = 0; /* # bad lines */
3696-+ int badflags = 0; /* # bad e->flags */
3697-+ int bad_log_op = 0;
3698-+ int zero_object_sz = 0;
3699- };
3700-
3701- void storeRebuildStart(void);
3702-diff --git a/src/tests/stub_MemObject.cc b/src/tests/stub_MemObject.cc
3703-index f33c334c..d0d6de37 100644
3704---- a/src/tests/stub_MemObject.cc
3705-+++ b/src/tests/stub_MemObject.cc
3706-@@ -29,20 +29,9 @@ MemObject::endOffset() const
3707- void MemObject::trimSwappable() STUB
3708- void MemObject::trimUnSwappable() STUB
3709- int64_t MemObject::policyLowestOffsetToKeep(bool swap) const STUB_RETVAL(-1)
3710--MemObject::MemObject() :
3711-- inmem_lo(0),
3712-- nclients(0),
3713-- request(NULL),
3714-- ping_reply_callback(NULL),
3715-- ircb_data(NULL),
3716-- id(0),
3717-- object_sz(-1),
3718-- swap_hdr_sz(0),
3719-- _reply(NULL)
3720--{
3721-- memset(&clients, 0, sizeof(clients));
3722-+MemObject::MemObject() {
3723-+ ping_reply_callback = nullptr;
3724- memset(&start_ping, 0, sizeof(start_ping));
3725-- memset(&abort, 0, sizeof(abort));
3726- } // NOP instead of elided due to Store
3727-
3728- HttpReply const * MemObject::getReply() const
3729-diff --git a/src/tests/stub_cache_manager.cc b/src/tests/stub_cache_manager.cc
3730-index a544a05a..4dacfd32 100644
3731---- a/src/tests/stub_cache_manager.cc
3732-+++ b/src/tests/stub_cache_manager.cc
3733-@@ -20,7 +20,7 @@ void CacheManager::Start(const Comm::ConnectionPointer &conn, HttpRequest * requ
3734- std::cerr << HERE << "\n";
3735- STUB
3736- }
3737--CacheManager* CacheManager::instance=0;
3738-+static CacheManager* instance = nullptr;
3739- CacheManager* CacheManager::GetInstance() STUB_RETVAL(instance)
3740- void Mgr::RegisterAction(char const*, char const*, OBJH, int, int) {}
3741- void Mgr::RegisterAction(char const *, char const *, Mgr::ClassActionCreationHandler *, int, int) {}
3742-diff --git a/src/tools.cc b/src/tools.cc
3743-index b7a0194b..954f58ce 100644
3744---- a/src/tools.cc
3745-+++ b/src/tools.cc
3746-@@ -319,7 +319,7 @@ death(int sig)
3747- #endif /* _SQUID_SOLARIS_and HAVE_LIBOPCOM_STACK */
3748- #if HAVE_BACKTRACE_SYMBOLS_FD
3749- {
3750-- static void *(callarray[8192]);
3751-+ static void *callarray[8192];
3752- int n;
3753- n = backtrace(callarray, 8192);
3754- backtrace_symbols_fd(callarray, n, fileno(debug_log));
3755-diff --git a/src/tunnel.cc b/src/tunnel.cc
3756-index 3197547a..4b4cf446 100644
3757---- a/src/tunnel.cc
3758-+++ b/src/tunnel.cc
3759-@@ -1158,7 +1158,6 @@ tunnelRelayConnectRequest(const Comm::ConnectionPointer &srv, void *data)
3760- HttpHeader hdr_out(hoRequest);
3761- Http::StateFlags flags;
3762- debugs(26, 3, HERE << srv << ", tunnelState=" << tunnelState);
3763-- memset(&flags, '\0', sizeof(flags));
3764- flags.proxying = tunnelState->request->flags.proxying;
3765- MemBuf mb;
3766- mb.init();
3767diff --git a/debian/patches/series b/debian/patches/series
3768index 12952d3..b5b05d4 100644
3769--- a/debian/patches/series
3770+++ b/debian/patches/series
3771@@ -1,7 +1,14 @@
3772 0001-Default-configuration-file-for-debian.patch
3773 0002-Change-default-file-locations-for-debian.patch
3774+<<<<<<< debian/patches/series
3775 0011-upstream-pr172.patch
3776 90-cf.data.ubuntu.patch
3777 99-ubuntu-ssl-cert-snakeoil.patch
3778 0003-installed-binary-for-debian-ci.patch
3779+=======
3780+0003-installed-binary-for-debian-ci.patch
3781+0004-upstream-pr264.patch
3782+90-cf.data.ubuntu.patch
3783+99-ubuntu-ssl-cert-snakeoil.patch
3784+>>>>>>> debian/patches/series
3785 fix-uninitialized-var.patch
3786diff --git a/debian/rules b/debian/rules
3787index 9b7b98c..ae8eaee 100755
3788--- a/debian/rules
3789+++ b/debian/rules
3790@@ -2,7 +2,17 @@
3791
3792 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
3793 export DEB_CFLAGS_MAINT_APPEND = -Wall
3794+<<<<<<< debian/rules
3795 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
3796+=======
3797+
3798+DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
3799+ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc powerpcspe sh4))
3800+ DEB_LDFLAGS_MAINT_APPEND += -latomic
3801+endif
3802+export DEB_LDFLAGS_MAINT_APPEND
3803+
3804+>>>>>>> debian/rules
3805 # On ppc64el, dpkg-buildflags sets -O3 instead of the usual
3806 # -O2. This makes gcc emit a format-truncation error on
3807 # pconn.cc. See https://bugs.squid-cache.org/show_bug.cgi?id=4875
3808diff --git a/debian/tests/control b/debian/tests/control
3809index 46d4877..c6bad41 100644
3810--- a/debian/tests/control
3811+++ b/debian/tests/control
3812@@ -3,5 +3,5 @@ Depends: @builddeps@, fakeroot, squid
3813 Restrictions: allow-stderr
3814
3815 Tests: squid
3816-Depends: squid, squidclient, elinks, netcat, pygopherd, apparmor-utils, vsftpd, apache2
3817+Depends: squid, squidclient, elinks, netcat, pygopherd, apparmor-utils, vsftpd, apache2, ssl-cert
3818 Restrictions: needs-root
3819diff --git a/doc/release-notes/release-4.html b/doc/release-notes/release-4.html
3820index 3d44a11..77a8bbc 100644
3821--- a/doc/release-notes/release-4.html
3822+++ b/doc/release-notes/release-4.html
3823@@ -2,10 +2,10 @@
3824 <HTML>
3825 <HEAD>
3826 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.72">
3827- <TITLE>Squid 4.1 release notes</TITLE>
3828+ <TITLE>Squid 4.2 release notes</TITLE>
3829 </HEAD>
3830 <BODY>
3831-<H1>Squid 4.1 release notes</H1>
3832+<H1>Squid 4.2 release notes</H1>
3833
3834 <H2>Squid Developers</H2>
3835 <HR>
3836@@ -63,7 +63,7 @@ for Applied Network Research and members of the Web Caching community.</EM>
3837 <HR>
3838 <H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>
3839
3840-<P>The Squid Team are pleased to announce the release of Squid-4.1 for testing.</P>
3841+<P>The Squid Team are pleased to announce the release of Squid-4.2 for testing.</P>
3842 <P>This new release is available for download from
3843 <A HREF="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</A> or the
3844 <A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>
3845diff --git a/errors/af/ERR_AGENT_CONFIGURE b/errors/af/ERR_AGENT_CONFIGURE
3846index e7a1eb6..d58a155 100644
3847--- a/errors/af/ERR_AGENT_CONFIGURE
3848+++ b/errors/af/ERR_AGENT_CONFIGURE
3849@@ -24,19 +24,19 @@ body
3850 <p>Hoe om hierdie instellings in die blaaier te vind:</p>
3851
3852 <div id="firefox"> For Firefox browsers go to: <ul>
3853-<li>Nutsgoed -&gt; Opsies -&gt; Gevorderd -&gt; Netwerk -&gt; Verbinding</li>
3854+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
3855 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3856 </ul>
3857 </div>
3858
3859 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
3860-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
3861+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
3862 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3863 </ul>
3864 </div>
3865
3866 <div id="opera"> For Opera browsers go to: <ul>
3867-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
3868+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
3869 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3870 </ul>
3871 </div>
3872diff --git a/errors/af/ERR_AGENT_WPAD b/errors/af/ERR_AGENT_WPAD
3873index 644d392..e46e267 100644
3874--- a/errors/af/ERR_AGENT_WPAD
3875+++ b/errors/af/ERR_AGENT_WPAD
3876@@ -24,19 +24,19 @@ body
3877 <p>Hoe om hierdie instellings in die blaaier te vind:</p>
3878
3879 <div id="firefox"> For Firefox browsers go to: <ul>
3880-<li>Nutsgoed -&gt; Opsies -&gt; Gevorderd -&gt; Netwerk -&gt; Verbinding</li>
3881+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
3882 <li>Kies "Outospeur instaanopstelling vir hierdie netwerk"</li>
3883 </ul>
3884 </div>
3885
3886 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
3887-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
3888+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
3889 <li>Select Automatically detect settings</li>
3890 </ul>
3891 </div>
3892
3893 <div id="opera"> For Opera browsers go to: <ul>
3894-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
3895+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
3896 <li>Select Use Automatic proxy configuration</li>
3897 </ul>
3898 </div>
3899diff --git a/errors/ar/ERR_AGENT_CONFIGURE b/errors/ar/ERR_AGENT_CONFIGURE
3900index ccc25f1..8acb97c 100644
3901--- a/errors/ar/ERR_AGENT_CONFIGURE
3902+++ b/errors/ar/ERR_AGENT_CONFIGURE
3903@@ -24,19 +24,19 @@ body
3904 <p>How to find these settings in your browser:</p>
3905
3906 <div id="firefox"> For Firefox browsers go to: <ul>
3907-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
3908+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
3909 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3910 </ul>
3911 </div>
3912
3913 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
3914-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
3915+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
3916 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3917 </ul>
3918 </div>
3919
3920 <div id="opera"> For Opera browsers go to: <ul>
3921-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
3922+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
3923 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3924 </ul>
3925 </div>
3926diff --git a/errors/ar/ERR_AGENT_WPAD b/errors/ar/ERR_AGENT_WPAD
3927index 5970022..c456513 100644
3928--- a/errors/ar/ERR_AGENT_WPAD
3929+++ b/errors/ar/ERR_AGENT_WPAD
3930@@ -24,19 +24,19 @@ body
3931 <p>How to find these settings in your browser:</p>
3932
3933 <div id="firefox"> For Firefox browsers go to: <ul>
3934-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
3935+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
3936 <li>Select Auto-detect proxy settings for this network</li>
3937 </ul>
3938 </div>
3939
3940 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
3941-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
3942+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
3943 <li>Select Automatically detect settings</li>
3944 </ul>
3945 </div>
3946
3947 <div id="opera"> For Opera browsers go to: <ul>
3948-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
3949+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
3950 <li>Select Use Automatic proxy configuration</li>
3951 </ul>
3952 </div>
3953diff --git a/errors/az/ERR_AGENT_CONFIGURE b/errors/az/ERR_AGENT_CONFIGURE
3954index 1615779..76b0066 100644
3955--- a/errors/az/ERR_AGENT_CONFIGURE
3956+++ b/errors/az/ERR_AGENT_CONFIGURE
3957@@ -24,19 +24,19 @@ body
3958 <p>How to find these settings in your browser:</p>
3959
3960 <div id="firefox"> For Firefox browsers go to: <ul>
3961-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
3962+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
3963 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3964 </ul>
3965 </div>
3966
3967 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
3968-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
3969+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
3970 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3971 </ul>
3972 </div>
3973
3974 <div id="opera"> For Opera browsers go to: <ul>
3975-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
3976+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
3977 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
3978 </ul>
3979 </div>
3980diff --git a/errors/az/ERR_AGENT_WPAD b/errors/az/ERR_AGENT_WPAD
3981index abb3dcd..740ddb6 100644
3982--- a/errors/az/ERR_AGENT_WPAD
3983+++ b/errors/az/ERR_AGENT_WPAD
3984@@ -24,19 +24,19 @@ body
3985 <p>How to find these settings in your browser:</p>
3986
3987 <div id="firefox"> For Firefox browsers go to: <ul>
3988-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
3989+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
3990 <li>Select Auto-detect proxy settings for this network</li>
3991 </ul>
3992 </div>
3993
3994 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
3995-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
3996+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
3997 <li>Select Automatically detect settings</li>
3998 </ul>
3999 </div>
4000
4001 <div id="opera"> For Opera browsers go to: <ul>
4002-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4003+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4004 <li>Select Use Automatic proxy configuration</li>
4005 </ul>
4006 </div>
4007diff --git a/errors/bg/ERR_AGENT_CONFIGURE b/errors/bg/ERR_AGENT_CONFIGURE
4008index eea67d5..c00d139 100644
4009--- a/errors/bg/ERR_AGENT_CONFIGURE
4010+++ b/errors/bg/ERR_AGENT_CONFIGURE
4011@@ -24,19 +24,19 @@ body
4012 <p>Как да намерите тези настройки на Вашия браузер:</p>
4013
4014 <div id="firefox"> For Firefox browsers go to: <ul>
4015-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4016+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4017 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4018 </ul>
4019 </div>
4020
4021 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4022-<li>Инструменти -&gt; Опции за интернет -&gt; Връзки -&gt; LAN настройки -&gt; Прокси сървър</li>
4023+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4024 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4025 </ul>
4026 </div>
4027
4028 <div id="opera"> For Opera browsers go to: <ul>
4029-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4030+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4031 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4032 </ul>
4033 </div>
4034diff --git a/errors/bg/ERR_AGENT_WPAD b/errors/bg/ERR_AGENT_WPAD
4035index 1b36da7..aa85d8c 100644
4036--- a/errors/bg/ERR_AGENT_WPAD
4037+++ b/errors/bg/ERR_AGENT_WPAD
4038@@ -24,19 +24,19 @@ body
4039 <p>Как да намерите тези настройки на Вашия браузер:</p>
4040
4041 <div id="firefox"> For Firefox browsers go to: <ul>
4042-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4043+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4044 <li>Select Auto-detect proxy settings for this network</li>
4045 </ul>
4046 </div>
4047
4048 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4049-<li>Инструменти -&gt; Опции за интернет -&gt; Връзки -&gt; LAN настройки -&gt; Прокси сървър</li>
4050+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4051 <li>Изберете Автоматично откриване на настройките.</li>
4052 </ul>
4053 </div>
4054
4055 <div id="opera"> For Opera browsers go to: <ul>
4056-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4057+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4058 <li>Изберете Използване на Автоматично конфигуриране на прокси сървър.</li>
4059 </ul>
4060 </div>
4061diff --git a/errors/ca/ERR_AGENT_CONFIGURE b/errors/ca/ERR_AGENT_CONFIGURE
4062index a0809f1..0b7d722 100644
4063--- a/errors/ca/ERR_AGENT_CONFIGURE
4064+++ b/errors/ca/ERR_AGENT_CONFIGURE
4065@@ -24,19 +24,19 @@ body
4066 <p>How to find these settings in your browser:</p>
4067
4068 <div id="firefox"> For Firefox browsers go to: <ul>
4069-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4070+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4071 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4072 </ul>
4073 </div>
4074
4075 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4076-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4077+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4078 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4079 </ul>
4080 </div>
4081
4082 <div id="opera"> For Opera browsers go to: <ul>
4083-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4084+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4085 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4086 </ul>
4087 </div>
4088diff --git a/errors/ca/ERR_AGENT_WPAD b/errors/ca/ERR_AGENT_WPAD
4089index 39121ce..23db622 100644
4090--- a/errors/ca/ERR_AGENT_WPAD
4091+++ b/errors/ca/ERR_AGENT_WPAD
4092@@ -24,19 +24,19 @@ body
4093 <p>How to find these settings in your browser:</p>
4094
4095 <div id="firefox"> For Firefox browsers go to: <ul>
4096-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4097+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4098 <li>Select Auto-detect proxy settings for this network</li>
4099 </ul>
4100 </div>
4101
4102 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4103-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4104+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4105 <li>Select Automatically detect settings</li>
4106 </ul>
4107 </div>
4108
4109 <div id="opera"> For Opera browsers go to: <ul>
4110-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4111+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4112 <li>Select Use Automatic proxy configuration</li>
4113 </ul>
4114 </div>
4115diff --git a/errors/cs/ERR_AGENT_CONFIGURE b/errors/cs/ERR_AGENT_CONFIGURE
4116index a0db5d0..32df978 100644
4117--- a/errors/cs/ERR_AGENT_CONFIGURE
4118+++ b/errors/cs/ERR_AGENT_CONFIGURE
4119@@ -24,19 +24,19 @@ body
4120 <p>How to find these settings in your browser:</p>
4121
4122 <div id="firefox"> For Firefox browsers go to: <ul>
4123-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4124+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4125 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4126 </ul>
4127 </div>
4128
4129 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4130-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4131+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4132 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4133 </ul>
4134 </div>
4135
4136 <div id="opera"> For Opera browsers go to: <ul>
4137-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4138+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4139 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4140 </ul>
4141 </div>
4142diff --git a/errors/cs/ERR_AGENT_WPAD b/errors/cs/ERR_AGENT_WPAD
4143index fc10fba..639a156 100644
4144--- a/errors/cs/ERR_AGENT_WPAD
4145+++ b/errors/cs/ERR_AGENT_WPAD
4146@@ -24,19 +24,19 @@ body
4147 <p>How to find these settings in your browser:</p>
4148
4149 <div id="firefox"> For Firefox browsers go to: <ul>
4150-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4151+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4152 <li>Select Auto-detect proxy settings for this network</li>
4153 </ul>
4154 </div>
4155
4156 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4157-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4158+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4159 <li>Select Automatically detect settings</li>
4160 </ul>
4161 </div>
4162
4163 <div id="opera"> For Opera browsers go to: <ul>
4164-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4165+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4166 <li>Select Use Automatic proxy configuration</li>
4167 </ul>
4168 </div>
4169diff --git a/errors/da/ERR_AGENT_CONFIGURE b/errors/da/ERR_AGENT_CONFIGURE
4170index dadc146..7e47b9c 100644
4171--- a/errors/da/ERR_AGENT_CONFIGURE
4172+++ b/errors/da/ERR_AGENT_CONFIGURE
4173@@ -24,19 +24,19 @@ body
4174 <p>How to find these settings in your browser:</p>
4175
4176 <div id="firefox"> For Firefox browsers go to: <ul>
4177-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4178+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4179 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4180 </ul>
4181 </div>
4182
4183 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4184-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4185+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4186 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4187 </ul>
4188 </div>
4189
4190 <div id="opera"> For Opera browsers go to: <ul>
4191-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4192+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4193 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4194 </ul>
4195 </div>
4196diff --git a/errors/da/ERR_AGENT_WPAD b/errors/da/ERR_AGENT_WPAD
4197index 495ba9c..d5ec9eb 100644
4198--- a/errors/da/ERR_AGENT_WPAD
4199+++ b/errors/da/ERR_AGENT_WPAD
4200@@ -24,19 +24,19 @@ body
4201 <p>How to find these settings in your browser:</p>
4202
4203 <div id="firefox"> For Firefox browsers go to: <ul>
4204-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4205+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4206 <li>Select Auto-detect proxy settings for this network</li>
4207 </ul>
4208 </div>
4209
4210 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4211-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4212+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4213 <li>Select Automatically detect settings</li>
4214 </ul>
4215 </div>
4216
4217 <div id="opera"> For Opera browsers go to: <ul>
4218-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4219+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4220 <li>Select Use Automatic proxy configuration</li>
4221 </ul>
4222 </div>
4223diff --git a/errors/de/ERR_AGENT_CONFIGURE b/errors/de/ERR_AGENT_CONFIGURE
4224index 43923fa..ffba266 100644
4225--- a/errors/de/ERR_AGENT_CONFIGURE
4226+++ b/errors/de/ERR_AGENT_CONFIGURE
4227@@ -24,19 +24,19 @@ body
4228 <p>Wie sie diese Einstellung in ihrem Browser finden:</p>
4229
4230 <div id="firefox"> For Firefox browsers go to: <ul>
4231-<li>Extras -&gt; Optionen -&gt; Erweitert -&gt; Netzwerk -&gt; Verbindungseinstellungen</li>
4232+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4233 <li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
4234 </ul>
4235 </div>
4236
4237 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4238-<li>Extras -&gt; Internetoptionen -&gt; Verbindung -&gt; LAN Einstellungen -&gt;Proxy</li>
4239+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4240 <li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
4241 </ul>
4242 </div>
4243
4244 <div id="opera"> For Opera browsers go to: <ul>
4245-<li>Extras -&gt; Einstellungen -&gt; Erweitert -&gt; Netzwerk -&gt; Proxyserver</li>
4246+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4247 <li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
4248 </ul>
4249 </div>
4250diff --git a/errors/de/ERR_AGENT_WPAD b/errors/de/ERR_AGENT_WPAD
4251index c485321..7d6f5f9 100644
4252--- a/errors/de/ERR_AGENT_WPAD
4253+++ b/errors/de/ERR_AGENT_WPAD
4254@@ -24,19 +24,19 @@ body
4255 <p>Wie sie diese Einstellung in ihrem Browser finden:</p>
4256
4257 <div id="firefox"> For Firefox browsers go to: <ul>
4258-<li>Extras -&gt; Optionen -&gt; Erweitert -&gt; Netzwerk -&gt; Verbindungseinstellungen</li>
4259+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4260 <li>Wählen sie Automatische Suche von Einstellungen für dieses Netzwerk</li>
4261 </ul>
4262 </div>
4263
4264 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4265-<li>Extras -&gt; Internetoptionen -&gt; Verbindung -&gt; LAN Einstellungen -&gt;Proxy</li>
4266+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4267 <li>Automatische Suche von Einstellungen</li>
4268 </ul>
4269 </div>
4270
4271 <div id="opera"> For Opera browsers go to: <ul>
4272-<li>Extras -&gt; Einstellungen -&gt; Erweitert -&gt; Netzwerk -&gt; Proxyserver</li>
4273+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4274 <li>Automatisches Konfigurationsskript verwenden</li>
4275 </ul>
4276 </div>
4277diff --git a/errors/el/ERR_AGENT_CONFIGURE b/errors/el/ERR_AGENT_CONFIGURE
4278index a98f80b..b618b4c 100644
4279--- a/errors/el/ERR_AGENT_CONFIGURE
4280+++ b/errors/el/ERR_AGENT_CONFIGURE
4281@@ -24,19 +24,19 @@ body
4282 <p>How to find these settings in your browser:</p>
4283
4284 <div id="firefox"> For Firefox browsers go to: <ul>
4285-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4286+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4287 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4288 </ul>
4289 </div>
4290
4291 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4292-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4293+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4294 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4295 </ul>
4296 </div>
4297
4298 <div id="opera"> For Opera browsers go to: <ul>
4299-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4300+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4301 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4302 </ul>
4303 </div>
4304diff --git a/errors/el/ERR_AGENT_WPAD b/errors/el/ERR_AGENT_WPAD
4305index 7a58039..86a2a95 100644
4306--- a/errors/el/ERR_AGENT_WPAD
4307+++ b/errors/el/ERR_AGENT_WPAD
4308@@ -24,19 +24,19 @@ body
4309 <p>How to find these settings in your browser:</p>
4310
4311 <div id="firefox"> For Firefox browsers go to: <ul>
4312-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4313+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4314 <li>Select Auto-detect proxy settings for this network</li>
4315 </ul>
4316 </div>
4317
4318 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4319-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4320+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4321 <li>Select Automatically detect settings</li>
4322 </ul>
4323 </div>
4324
4325 <div id="opera"> For Opera browsers go to: <ul>
4326-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4327+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4328 <li>Select Use Automatic proxy configuration</li>
4329 </ul>
4330 </div>
4331diff --git a/errors/en/ERR_AGENT_CONFIGURE b/errors/en/ERR_AGENT_CONFIGURE
4332index 43746e3..abc5c12 100644
4333--- a/errors/en/ERR_AGENT_CONFIGURE
4334+++ b/errors/en/ERR_AGENT_CONFIGURE
4335@@ -24,19 +24,19 @@ body
4336 <p>How to find these settings in your browser:</p>
4337
4338 <div id="firefox"> For Firefox browsers go to: <ul>
4339-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4340+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4341 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4342 </ul>
4343 </div>
4344
4345 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4346-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4347+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4348 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4349 </ul>
4350 </div>
4351
4352 <div id="opera"> For Opera browsers go to: <ul>
4353-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4354+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4355 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4356 </ul>
4357 </div>
4358diff --git a/errors/en/ERR_AGENT_WPAD b/errors/en/ERR_AGENT_WPAD
4359index a9e18bc..11377eb 100644
4360--- a/errors/en/ERR_AGENT_WPAD
4361+++ b/errors/en/ERR_AGENT_WPAD
4362@@ -24,19 +24,19 @@ body
4363 <p>How to find these settings in your browser:</p>
4364
4365 <div id="firefox"> For Firefox browsers go to: <ul>
4366-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4367+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4368 <li>Select Auto-detect proxy settings for this network</li>
4369 </ul>
4370 </div>
4371
4372 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4373-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4374+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4375 <li>Select Automatically detect settings</li>
4376 </ul>
4377 </div>
4378
4379 <div id="opera"> For Opera browsers go to: <ul>
4380-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4381+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4382 <li>Select Use Automatic proxy configuration</li>
4383 </ul>
4384 </div>
4385diff --git a/errors/es/ERR_AGENT_CONFIGURE b/errors/es/ERR_AGENT_CONFIGURE
4386index 0370d97..532679d 100644
4387--- a/errors/es/ERR_AGENT_CONFIGURE
4388+++ b/errors/es/ERR_AGENT_CONFIGURE
4389@@ -24,19 +24,19 @@ body
4390 <p>Como encontrar estas preferencias en su navegador:</p>
4391
4392 <div id="firefox"> For Firefox browsers go to: <ul>
4393-<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Ajustes de conexión</li>
4394+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4395 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4396 </ul>
4397 </div>
4398
4399 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4400-<li>Herramientas -&gt; Opciones de Internet -&gt; Conexión -&gt; Preferencias de RED -&gt;Proxy</li>
4401+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4402 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4403 </ul>
4404 </div>
4405
4406 <div id="opera"> For Opera browsers go to: <ul>
4407-<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Servidores Proxy</li>
4408+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4409 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4410 </ul>
4411 </div>
4412diff --git a/errors/es/ERR_AGENT_WPAD b/errors/es/ERR_AGENT_WPAD
4413index 72fdb4b..e281782 100644
4414--- a/errors/es/ERR_AGENT_WPAD
4415+++ b/errors/es/ERR_AGENT_WPAD
4416@@ -24,19 +24,19 @@ body
4417 <p>Como encontrar estas preferencias en su navegador:</p>
4418
4419 <div id="firefox"> For Firefox browsers go to: <ul>
4420-<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Ajustes de conexión</li>
4421+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4422 <li>Select Auto-detect proxy settings for this network</li>
4423 </ul>
4424 </div>
4425
4426 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4427-<li>Herramientas -&gt; Opciones de Internet -&gt; Conexión -&gt; Preferencias de RED -&gt;Proxy</li>
4428+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4429 <li>Seleccione Detectar preferencias automáticamente</li>
4430 </ul>
4431 </div>
4432
4433 <div id="opera"> For Opera browsers go to: <ul>
4434-<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Servidores Proxy</li>
4435+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4436 <li>Seleccione Usar Configuración automática de Proxy</li>
4437 </ul>
4438 </div>
4439diff --git a/errors/et/ERR_AGENT_CONFIGURE b/errors/et/ERR_AGENT_CONFIGURE
4440index 7997973..c69e054 100644
4441--- a/errors/et/ERR_AGENT_CONFIGURE
4442+++ b/errors/et/ERR_AGENT_CONFIGURE
4443@@ -24,19 +24,19 @@ body
4444 <p>How to find these settings in your browser:</p>
4445
4446 <div id="firefox"> For Firefox browsers go to: <ul>
4447-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4448+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4449 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4450 </ul>
4451 </div>
4452
4453 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4454-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4455+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4456 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4457 </ul>
4458 </div>
4459
4460 <div id="opera"> For Opera browsers go to: <ul>
4461-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4462+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4463 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4464 </ul>
4465 </div>
4466diff --git a/errors/et/ERR_AGENT_WPAD b/errors/et/ERR_AGENT_WPAD
4467index f7641cd..381adbe 100644
4468--- a/errors/et/ERR_AGENT_WPAD
4469+++ b/errors/et/ERR_AGENT_WPAD
4470@@ -24,19 +24,19 @@ body
4471 <p>How to find these settings in your browser:</p>
4472
4473 <div id="firefox"> For Firefox browsers go to: <ul>
4474-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4475+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4476 <li>Select Auto-detect proxy settings for this network</li>
4477 </ul>
4478 </div>
4479
4480 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4481-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4482+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4483 <li>Select Automatically detect settings</li>
4484 </ul>
4485 </div>
4486
4487 <div id="opera"> For Opera browsers go to: <ul>
4488-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4489+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4490 <li>Select Use Automatic proxy configuration</li>
4491 </ul>
4492 </div>
4493diff --git a/errors/fa/ERR_AGENT_CONFIGURE b/errors/fa/ERR_AGENT_CONFIGURE
4494index 583abee..fa9d6fc 100644
4495--- a/errors/fa/ERR_AGENT_CONFIGURE
4496+++ b/errors/fa/ERR_AGENT_CONFIGURE
4497@@ -24,19 +24,19 @@ body
4498 <p>How to find these settings in your browser:</p>
4499
4500 <div id="firefox"> For Firefox browsers go to: <ul>
4501-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4502+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4503 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4504 </ul>
4505 </div>
4506
4507 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4508-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4509+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4510 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4511 </ul>
4512 </div>
4513
4514 <div id="opera"> For Opera browsers go to: <ul>
4515-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4516+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4517 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4518 </ul>
4519 </div>
4520diff --git a/errors/fa/ERR_AGENT_WPAD b/errors/fa/ERR_AGENT_WPAD
4521index 518e7c5..8d0ad9e 100644
4522--- a/errors/fa/ERR_AGENT_WPAD
4523+++ b/errors/fa/ERR_AGENT_WPAD
4524@@ -24,19 +24,19 @@ body
4525 <p>How to find these settings in your browser:</p>
4526
4527 <div id="firefox"> For Firefox browsers go to: <ul>
4528-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4529+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4530 <li>Select Auto-detect proxy settings for this network</li>
4531 </ul>
4532 </div>
4533
4534 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4535-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4536+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4537 <li>Select Automatically detect settings</li>
4538 </ul>
4539 </div>
4540
4541 <div id="opera"> For Opera browsers go to: <ul>
4542-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4543+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4544 <li>Select Use Automatic proxy configuration</li>
4545 </ul>
4546 </div>
4547diff --git a/errors/fi/ERR_AGENT_CONFIGURE b/errors/fi/ERR_AGENT_CONFIGURE
4548index 992b801..6b97849 100644
4549--- a/errors/fi/ERR_AGENT_CONFIGURE
4550+++ b/errors/fi/ERR_AGENT_CONFIGURE
4551@@ -24,19 +24,19 @@ body
4552 <p>How to find these settings in your browser:</p>
4553
4554 <div id="firefox"> For Firefox browsers go to: <ul>
4555-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4556+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4557 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4558 </ul>
4559 </div>
4560
4561 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4562-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4563+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4564 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4565 </ul>
4566 </div>
4567
4568 <div id="opera"> For Opera browsers go to: <ul>
4569-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4570+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4571 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4572 </ul>
4573 </div>
4574diff --git a/errors/fi/ERR_AGENT_WPAD b/errors/fi/ERR_AGENT_WPAD
4575index 4295501..f77cfa1 100644
4576--- a/errors/fi/ERR_AGENT_WPAD
4577+++ b/errors/fi/ERR_AGENT_WPAD
4578@@ -24,19 +24,19 @@ body
4579 <p>How to find these settings in your browser:</p>
4580
4581 <div id="firefox"> For Firefox browsers go to: <ul>
4582-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4583+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4584 <li>Select Auto-detect proxy settings for this network</li>
4585 </ul>
4586 </div>
4587
4588 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4589-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4590+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4591 <li>Valitse Automaattisesti haetut asetukset</li>
4592 </ul>
4593 </div>
4594
4595 <div id="opera"> For Opera browsers go to: <ul>
4596-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4597+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4598 <li>Select Use Automatic proxy configuration</li>
4599 </ul>
4600 </div>
4601diff --git a/errors/fr/ERR_AGENT_CONFIGURE b/errors/fr/ERR_AGENT_CONFIGURE
4602index 8e82dd1..7023db3 100644
4603--- a/errors/fr/ERR_AGENT_CONFIGURE
4604+++ b/errors/fr/ERR_AGENT_CONFIGURE
4605@@ -24,19 +24,19 @@ body
4606 <p>Comment trouver ces réglages dans votre navigateur :</p>
4607
4608 <div id="firefox"> For Firefox browsers go to: <ul>
4609-<li>Outils -&gt; Options -&gt; Avancé -&gt; Réseau -&gt; Paramètres de Connexion</li>
4610+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4611 <li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
4612 </ul>
4613 </div>
4614
4615 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4616-<li>Outils -&gt; Options Internet -&gt; Connexion -&gt; Paramètres LAN -&gt; Proxy</li>
4617+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4618 <li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
4619 </ul>
4620 </div>
4621
4622 <div id="opera"> For Opera browsers go to: <ul>
4623-<li>Outils -&gt; Préférences -&gt; Avancé -&gt; Réseau -&gt; Serveur Proxy</li>
4624+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4625 <li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
4626 </ul>
4627 </div>
4628diff --git a/errors/fr/ERR_AGENT_WPAD b/errors/fr/ERR_AGENT_WPAD
4629index 12ab773..0dbf51f 100644
4630--- a/errors/fr/ERR_AGENT_WPAD
4631+++ b/errors/fr/ERR_AGENT_WPAD
4632@@ -24,19 +24,19 @@ body
4633 <p>Comment trouver ces réglages dans votre navigateur :</p>
4634
4635 <div id="firefox"> For Firefox browsers go to: <ul>
4636-<li>Outils -&gt; Options -&gt; Avancé -&gt; Réseau -&gt; Paramètres de Connexion</li>
4637+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4638 <li>Sélectionnez détection automatique dans les paramètres du proxy pour ce réseau</li>
4639 </ul>
4640 </div>
4641
4642 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4643-<li>Outils -&gt; Options Internet -&gt; Connexion -&gt; Paramètres LAN -&gt; Proxy</li>
4644+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4645 <li>Sélectionnez le paramètre détection automatique</li>
4646 </ul>
4647 </div>
4648
4649 <div id="opera"> For Opera browsers go to: <ul>
4650-<li>Outils -&gt; Préférences -&gt; Avancé -&gt; Réseau -&gt; Serveur Proxy</li>
4651+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4652 <li>Utilisez la sélection automatique pour configurer le proxy</li>
4653 </ul>
4654 </div>
4655diff --git a/errors/he/ERR_AGENT_CONFIGURE b/errors/he/ERR_AGENT_CONFIGURE
4656index cd8f9aa..fdc306e 100644
4657--- a/errors/he/ERR_AGENT_CONFIGURE
4658+++ b/errors/he/ERR_AGENT_CONFIGURE
4659@@ -24,19 +24,19 @@ body
4660 <p>איך למצוא את ההגדרות האלה בדפדפן שלך:</p>
4661
4662 <div id="firefox"> For Firefox browsers go to: <ul>
4663-<li>כלים -&gt; אפשרויות -&gt; אפשרויות מתקדמות -&gt; רשת -&gt; הגדרות חיבור</li>
4664+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4665 <li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
4666 </ul>
4667 </div>
4668
4669 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4670-<li>כלים -&gt; אפשרויות אינטרנט -&gt; חיבורים -&gt; הגדרות LAN -&gt; פרוקסי</li>
4671+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4672 <li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
4673 </ul>
4674 </div>
4675
4676 <div id="opera"> For Opera browsers go to: <ul>
4677-<li>כלים -&gt; העדפות -&gt; הגדרות מתקדמות -&gt; רשת -&gt; שרתי פרוקסי</li>
4678+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4679 <li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
4680 </ul>
4681 </div>
4682diff --git a/errors/he/ERR_AGENT_WPAD b/errors/he/ERR_AGENT_WPAD
4683index 612dff2..96fe246 100644
4684--- a/errors/he/ERR_AGENT_WPAD
4685+++ b/errors/he/ERR_AGENT_WPAD
4686@@ -24,19 +24,19 @@ body
4687 <p>איך למצוא את ההגדרות האלה בדפדפן שלך:</p>
4688
4689 <div id="firefox"> For Firefox browsers go to: <ul>
4690-<li>כלים -&gt; אפשרויות -&gt; אפשרויות מתקדמות -&gt; רשת -&gt; הגדרות חיבור</li>
4691+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4692 <li>בחר "איתור הגדרות אוטומטי" עבר הרשת הזו</li>
4693 </ul>
4694 </div>
4695
4696 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4697-<li>כלים -&gt; אפשרויות אינטרנט -&gt; חיבורים -&gt; הגדרות LAN -&gt; פרוקסי</li>
4698+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4699 <li>בחר "איתור הגדרות אוטומטי"</li>
4700 </ul>
4701 </div>
4702
4703 <div id="opera"> For Opera browsers go to: <ul>
4704-<li>כלים -&gt; העדפות -&gt; הגדרות מתקדמות -&gt; רשת -&gt; שרתי פרוקסי</li>
4705+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4706 <li>בחר באיתור הגדרות אוטומטי עבור הגדרת הפרוקסי</li>
4707 </ul>
4708 </div>
4709diff --git a/errors/hu/ERR_AGENT_CONFIGURE b/errors/hu/ERR_AGENT_CONFIGURE
4710index 8c6ab8d..4407791 100644
4711--- a/errors/hu/ERR_AGENT_CONFIGURE
4712+++ b/errors/hu/ERR_AGENT_CONFIGURE
4713@@ -24,19 +24,19 @@ body
4714 <p>Ezeket a beállításokat az alábbi menüpontokon keresztül találhatja meg:</p>
4715
4716 <div id="firefox"> For Firefox browsers go to: <ul>
4717-<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Kapcsolatbeállítások</li>
4718+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4719 <li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
4720 </ul>
4721 </div>
4722
4723 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4724-<li>Eszközök -&gt; Internetbeállítások -&gt; Kapcsolat -&gt; Helyi hálózat beállításai -&gt; Proxy</li>
4725+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4726 <li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
4727 </ul>
4728 </div>
4729
4730 <div id="opera"> For Opera browsers go to: <ul>
4731-<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Proxyszerverek</li>
4732+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4733 <li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
4734 </ul>
4735 </div>
4736diff --git a/errors/hu/ERR_AGENT_WPAD b/errors/hu/ERR_AGENT_WPAD
4737index 1923696..fb4904c 100644
4738--- a/errors/hu/ERR_AGENT_WPAD
4739+++ b/errors/hu/ERR_AGENT_WPAD
4740@@ -24,19 +24,19 @@ body
4741 <p>Ezeket a beállításokat az alábbi menüpontokon keresztül találhatja meg:</p>
4742
4743 <div id="firefox"> For Firefox browsers go to: <ul>
4744-<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Kapcsolatbeállítások</li>
4745+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4746 <li>Válassza ki a „Proxybeállítások automatikus felismerése ehhez a hálózathoz” jelölőnégyzetet</li>
4747 </ul>
4748 </div>
4749
4750 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4751-<li>Eszközök -&gt; Internetbeállítások -&gt; Kapcsolat -&gt; Helyi hálózat beállításai -&gt; Proxy</li>
4752+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4753 <li>Válassza ki az „Automatikus felismerés” opciót</li>
4754 </ul>
4755 </div>
4756
4757 <div id="opera"> For Opera browsers go to: <ul>
4758-<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Proxyszerverek</li>
4759+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4760 <li>Válassza ki az "Automatikus proxybeállítás használata" opciót</li>
4761 </ul>
4762 </div>
4763diff --git a/errors/hy/ERR_AGENT_CONFIGURE b/errors/hy/ERR_AGENT_CONFIGURE
4764index 509224e..f79b80d 100644
4765--- a/errors/hy/ERR_AGENT_CONFIGURE
4766+++ b/errors/hy/ERR_AGENT_CONFIGURE
4767@@ -24,19 +24,19 @@ body
4768 <p>Ինչպես փնտրել այս կարգաբերումները քո բրաուզերում:</p>
4769
4770 <div id="firefox"> For Firefox browsers go to: <ul>
4771-<li>Գործիքներ -&gt; Կարգաբերումներ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Կապի կարգաբերումներ</li>
4772+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4773 <li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
4774 </ul>
4775 </div>
4776
4777 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4778-<li>Գործիքներ -&gt; Ինտերնետ կարգաբերումներ -&gt; Կապ -&gt; LAN կարգաբերումներ -&gt;Պրոքսի</li>
4779+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4780 <li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
4781 </ul>
4782 </div>
4783
4784 <div id="opera"> For Opera browsers go to: <ul>
4785-<li>Գործիքներ -&gt; Նախընտրություններ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Պրոքսի սերվերներ</li>
4786+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4787 <li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
4788 </ul>
4789 </div>
4790diff --git a/errors/hy/ERR_AGENT_WPAD b/errors/hy/ERR_AGENT_WPAD
4791index 4fbec01..1ed2c43 100644
4792--- a/errors/hy/ERR_AGENT_WPAD
4793+++ b/errors/hy/ERR_AGENT_WPAD
4794@@ -24,19 +24,19 @@ body
4795 <p>Ինչպես փնտրել այս կարգաբերումները քո բրաուզերում:</p>
4796
4797 <div id="firefox"> For Firefox browsers go to: <ul>
4798-<li>Գործիքներ -&gt; Կարգաբերումներ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Կապի կարգաբերումներ</li>
4799+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4800 <li>Ընտրեք Auto-detect proxy settings for this network</li>
4801 </ul>
4802 </div>
4803
4804 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4805-<li>Գործիքներ -&gt; Ինտերնետ կարգաբերումներ -&gt; Կապ -&gt; LAN կարգաբերումներ -&gt;Պրոքսի</li>
4806+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4807 <li>Ընտրեք Automatically detect settings</li>
4808 </ul>
4809 </div>
4810
4811 <div id="opera"> For Opera browsers go to: <ul>
4812-<li>Գործիքներ -&gt; Նախընտրություններ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Պրոքսի սերվերներ</li>
4813+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4814 <li>Ընտրեք Use Automatic proxy configuration</li>
4815 </ul>
4816 </div>
4817diff --git a/errors/id/ERR_AGENT_CONFIGURE b/errors/id/ERR_AGENT_CONFIGURE
4818index 43746e3..abc5c12 100644
4819--- a/errors/id/ERR_AGENT_CONFIGURE
4820+++ b/errors/id/ERR_AGENT_CONFIGURE
4821@@ -24,19 +24,19 @@ body
4822 <p>How to find these settings in your browser:</p>
4823
4824 <div id="firefox"> For Firefox browsers go to: <ul>
4825-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4826+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4827 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4828 </ul>
4829 </div>
4830
4831 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4832-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4833+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4834 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4835 </ul>
4836 </div>
4837
4838 <div id="opera"> For Opera browsers go to: <ul>
4839-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4840+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4841 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4842 </ul>
4843 </div>
4844diff --git a/errors/id/ERR_AGENT_WPAD b/errors/id/ERR_AGENT_WPAD
4845index a9e18bc..11377eb 100644
4846--- a/errors/id/ERR_AGENT_WPAD
4847+++ b/errors/id/ERR_AGENT_WPAD
4848@@ -24,19 +24,19 @@ body
4849 <p>How to find these settings in your browser:</p>
4850
4851 <div id="firefox"> For Firefox browsers go to: <ul>
4852-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4853+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4854 <li>Select Auto-detect proxy settings for this network</li>
4855 </ul>
4856 </div>
4857
4858 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4859-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4860+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4861 <li>Select Automatically detect settings</li>
4862 </ul>
4863 </div>
4864
4865 <div id="opera"> For Opera browsers go to: <ul>
4866-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
4867+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4868 <li>Select Use Automatic proxy configuration</li>
4869 </ul>
4870 </div>
4871diff --git a/errors/it/ERR_AGENT_CONFIGURE b/errors/it/ERR_AGENT_CONFIGURE
4872index 36a7977..efa6e92 100644
4873--- a/errors/it/ERR_AGENT_CONFIGURE
4874+++ b/errors/it/ERR_AGENT_CONFIGURE
4875@@ -24,19 +24,19 @@ body
4876 <p>Indicazioni su come configurare il tuo browser sono disponibili a:</p>
4877
4878 <div id="firefox"> For Firefox browsers go to: <ul>
4879-<li>Strumenti -&gt; Opzioni -&gt; Avanzate -&gt; Rete -&gt; Impostazioni di connessione</li>
4880+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4881 <li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
4882 </ul>
4883 </div>
4884
4885 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4886-<li>Strumenti -&gt; Opzioni Internet -&gt; Connessioni -&gt; Impostazioni LAN -&gt;Proxy</li>
4887+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4888 <li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
4889 </ul>
4890 </div>
4891
4892 <div id="opera"> For Opera browsers go to: <ul>
4893-<li>Strumenti -&gt; Preferenze -&gt; Avanzate -&gt; Rete -&gt; Server proxy</li>
4894+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4895 <li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
4896 </ul>
4897 </div>
4898diff --git a/errors/it/ERR_AGENT_WPAD b/errors/it/ERR_AGENT_WPAD
4899index 7f219db..e1c8a9d 100644
4900--- a/errors/it/ERR_AGENT_WPAD
4901+++ b/errors/it/ERR_AGENT_WPAD
4902@@ -24,19 +24,19 @@ body
4903 <p>Indicazioni su come configurare il tuo browser sono disponibili a:</p>
4904
4905 <div id="firefox"> For Firefox browsers go to: <ul>
4906-<li>Strumenti -&gt; Opzioni -&gt; Avanzate -&gt; Rete -&gt; Impostazioni di connessione</li>
4907+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4908 <li>Seleziona "Rileva automaticamente impostazioni proxy per questa rete"</li>
4909 </ul>
4910 </div>
4911
4912 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4913-<li>Strumenti -&gt; Opzioni Internet -&gt; Connessioni -&gt; Impostazioni LAN -&gt;Proxy</li>
4914+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4915 <li>Seleziona "Rileva automaticamente impostazioni"</li>
4916 </ul>
4917 </div>
4918
4919 <div id="opera"> For Opera browsers go to: <ul>
4920-<li>Strumenti -&gt; Preferenze -&gt; Avanzate -&gt; Rete -&gt; Server proxy</li>
4921+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4922 <li>Seleziona "Usa script di configurazione automatica"</li>
4923 </ul>
4924 </div>
4925diff --git a/errors/ja/ERR_AGENT_CONFIGURE b/errors/ja/ERR_AGENT_CONFIGURE
4926index 5084a0a..a91bf1f 100644
4927--- a/errors/ja/ERR_AGENT_CONFIGURE
4928+++ b/errors/ja/ERR_AGENT_CONFIGURE
4929@@ -24,19 +24,19 @@ body
4930 <p>ご利用のブラウザを設定する方法の探し方:</p>
4931
4932 <div id="firefox"> For Firefox browsers go to: <ul>
4933-<li>ツール -&gt; オプション -&gt; 詳細 -&gt; ネットワーク -&gt; 接続設定</li>
4934+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4935 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4936 </ul>
4937 </div>
4938
4939 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4940-<li>ツール -&gt; インターネット オプション -&gt; 接続 -&gt; LAN の設定 -&gt; プロキシ サーバー</li>
4941+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4942 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4943 </ul>
4944 </div>
4945
4946 <div id="opera"> For Opera browsers go to: <ul>
4947-<li>ツール -&gt; 設定 -&gt; 詳細 -&gt; ネットワーク -&gt; プロキシサーバー</li>
4948+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4949 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4950 </ul>
4951 </div>
4952diff --git a/errors/ja/ERR_AGENT_WPAD b/errors/ja/ERR_AGENT_WPAD
4953index 7518de5..84fe8af 100644
4954--- a/errors/ja/ERR_AGENT_WPAD
4955+++ b/errors/ja/ERR_AGENT_WPAD
4956@@ -24,19 +24,19 @@ body
4957 <p>ご利用のブラウザを設定する方法の探し方:</p>
4958
4959 <div id="firefox"> For Firefox browsers go to: <ul>
4960-<li>ツール -&gt; オプション -&gt; 詳細 -&gt; ネットワーク -&gt; 接続設定</li>
4961+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4962 <li>Select Auto-detect proxy settings for this network</li>
4963 </ul>
4964 </div>
4965
4966 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4967-<li>ツール -&gt; インターネット オプション -&gt; 接続 -&gt; LAN の設定 -&gt; プロキシ サーバー</li>
4968+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4969 <li>自動検出の設定を選択してください。</li>
4970 </ul>
4971 </div>
4972
4973 <div id="opera"> For Opera browsers go to: <ul>
4974-<li>ツール -&gt; 設定 -&gt; 詳細 -&gt; ネットワーク -&gt; プロキシサーバー</li>
4975+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
4976 <li>proxyの自動構成を選択してください。</li>
4977 </ul>
4978 </div>
4979diff --git a/errors/ka/ERR_AGENT_CONFIGURE b/errors/ka/ERR_AGENT_CONFIGURE
4980index 43746e3..abc5c12 100644
4981--- a/errors/ka/ERR_AGENT_CONFIGURE
4982+++ b/errors/ka/ERR_AGENT_CONFIGURE
4983@@ -24,19 +24,19 @@ body
4984 <p>How to find these settings in your browser:</p>
4985
4986 <div id="firefox"> For Firefox browsers go to: <ul>
4987-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
4988+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
4989 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4990 </ul>
4991 </div>
4992
4993 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
4994-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
4995+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
4996 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
4997 </ul>
4998 </div>
4999
5000 <div id="opera"> For Opera browsers go to: <ul>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches