]> git.ipfire.org Git - thirdparty/squid.git/commit
Avoid buffer overrun by comm_read()
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 8 Mar 2014 00:18:11 +0000 (16:18 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 8 Mar 2014 00:18:11 +0000 (16:18 -0800)
commit95e25eaeebb6bd36e90ee806aabd886a83b1fe6e
treef4ae07196e1a5a286e153664ebca28e1c2d9b4d6
parentdcc525d55ad6c0cc2a7a67083779efd000663342
Avoid buffer overrun by comm_read()

It seems the space details provided by SBuf do not necesarily match the
existing MemBlob size. If for example actions like consume() have shifted
the SBuf down the MemBlob buffer.

Use spaceSize() to guarantee that the underlying MemBlob store still
provides sufficient buffer to fill without overflowing.
src/client_side.cc