[squid-dev] [PATCH] VIA creation code duplication

Eduard Bagdasaryan eduard.bagdasaryan at measurement-factory.com
Mon Mar 13 14:25:48 UTC 2017


On 14.02.2017 04:22, Amos Jeffries wrote:
> The problem is with proxy where the admin has configured large headers
> to be allowed, and receives a Via just under the 6KB liit. Our append
> pushing it over by even one byte would assert.

I am attaching a patch using SBuf instead of String for Via
accumulating, as you previously suggested. I am not
sure this is a much better solution since we have to do an
extra copy into SBuf.

 > The older bbuf code
 > cropping at 1KB was nasty but would not crash Squid.

I don't see the code preventing Squid from String overflow
there. The bbuf you are talking about was appended to via string
by strListAdd() without any checks...


Thanks,
Eduard.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20170313/18fb7655/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQUID-73-de-duplicate-hdr-via-t3.patch
Type: text/x-patch
Size: 16300 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20170313/18fb7655/attachment.bin>


More information about the squid-dev mailing list