]> git.ipfire.org Git - thirdparty/squid.git/commit
Protect MemBlob::append() against raw-space writes
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 9 Mar 2014 02:15:24 +0000 (19:15 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 9 Mar 2014 02:15:24 +0000 (19:15 -0700)
commit5181ac037cd05aa439eb0da6f94b58db486db5b1
treec88b2dda01cf27183d317f616dfb8f166c6208bc
parenta35ced5ed7aa569727e80c54cd49c4b0c19e7105
Protect MemBlob::append() against raw-space writes

There is no guarantee that the 'unused' area of MemBlob is actually
unused. For example if a read buffer was being filled into the
rawSpace() of a SBuf or MemBlob it will overlap with this empty area
until a read call updates the related size state in MemBlob/SBuf.

For these cases we must use memmove() which guarantees no buffer
corruption will take place on memory overlaps.
src/MemBlob.cc