See http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/2175/changes
Changes:
[Amos Jeffries] Fix helper buffer management
Identified by Tsantilas Christos.
One byte remains in helpers io buffer after parsing the response. This is
will cause problems when the next response from helper will enter squid.
After the srv-rbuf parsed, the srv-rbuf still contains on byte (a '\0'
char) and the srv-roffset is 1.
Perform memmove() in helperHandleRead() instead of helperReturnBuffer()
* helperReturnBuffer is only dealing with the message sub-string, but has
been made to memmove() the buffer contents which means it has to become
aware of these problematic terminal \0 octet(s). However
helperHandleRead() is where the termination is being done and the
buffer information is all being handled.
Pass the first of the termination \0 octets to helperReturnBuffer() not
the last \0. This is made possible after fixing (1a).
* helpers which return \r\n were still passing the location of the \n as
endpoint to workaround (1a) even though the \r is also replaced with
\0 and shortens the msg portion by one octet. This affects the
HelperReply parser length checks on responses without kv-pair.
Also, clear out an obsolete TODO.
Also, document a remaining design issue in stateful helpers assuming each
read() operation is on response and ignoring any octets in the buffer
after parsing one reply.
--
[...truncated 52819 lines...]
make[4]: Entering directory
`http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/helpers/external_acl/file_userip'
if g++ -DHAVE_CONFIG_H -I../../../.. -I../../../../include -I../../../../lib
-I../../../../src -I../../../include -Wall -Wpointer-arith -Wwrite-strings
-Wcomments -Werror -pipe -D_REENTRANT -g -O2 -MT ext_file_userip_acl.o -MD -MP
-MF .deps/ext_file_userip_acl.Tpo -c -o ext_file_userip_acl.o
../../../../helpers/external_acl/file_userip/ext_file_userip_acl.cc; \
then mv -f .deps/ext_file_userip_acl.Tpo
.deps/ext_file_userip_acl.Po; else rm -f .deps/ext_file_userip_acl.Tpo;
exit 1; fi
/bin/sh ../../../libtool --tag=CXX --mode=link g++ -Wall -Wpointer-arith
-Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -g -o
ext_file_userip_acl ext_file_userip_acl.o ../../../lib/libmiscencoding.la
-L../../../compat -lcompat-squid -lm -lnsl -lresolv -lrt -ldl -ldl
libtool: link: g++ -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror
-pipe -D_REENTRANT -g -O2 -g -o ext_file_userip_acl ext_file_userip_acl.o
../../../lib/.libs/libmiscencoding.a
-Lhttp://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/compat
-lcompat-squid -lm -lnsl -lresolv -lrt -ldl
make[4]: Leaving directory
`http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/helpers/external_acl/file_userip'
Making all in kerberos_ldap_group
make[4]: Entering directory
`http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/helpers/external_acl/kerberos_ldap_group'
make[5]: Entering directory
`http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/helpers/external_acl/kerberos_ldap_group'
if g++ -DHAVE_CONFIG_H -I../../../.. -I../../../../include -I../../../../lib
-I../../../../src -I../../../include-I../../../.. -I../../../../include
-I../../../../lib -I../../../../src -I../../../include
-I../../../../helpers/external_acl/kerberos_ldap_group -Wall -Wpointer-arith
-Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -MT
kerberos_ldap_group.o -MD -MP -MF .deps/kerberos_ldap_group.Tpo -c -o
kerberos_ldap_group.o
../../../../helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc; \
then mv -f .deps/kerberos_ldap_group.Tpo
.deps/kerberos_ldap_group.Po; else rm -f .deps/kerberos_ldap_group.Tpo;
exit 1; fi
if g++ -DHAVE_CONFIG_H -I../../../.. -I../../../../include -I../../../../lib
-I../../../../src -I../../../include-I../../../.. -I../../../../include
-I../../../../lib -I../../../../src -I../../../include
-I../../../../helpers/external_acl/kerberos_ldap_group -Wall -Wpointer-arith
-Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -MT
support_group.o -MD -MP -MF .deps/support_group.Tpo -c -o support_group.o
../../../../helpers/external_acl/kerberos_ldap_group/support_group.cc; \
then mv -f .deps/support_group.Tpo .deps/support_group.Po; else rm
-f .deps/support_group.Tpo; exit 1; fi
if g++ -DHAVE_CONFIG_H -I../../../.. -I../../../../include -I../../../../lib
-I../../../../src -I../../../include-I../../../.. -I../../../../include
-I../../../../lib -I../../../../src -I../../../include
-I../../../../helpers/external_acl/kerberos_ldap_group -Wall -Wpointer-arith
-Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g