]> git.ipfire.org Git - thirdparty/squid.git/commit
squidpurge: fix META TLV parsing issues
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 31 Dec 2012 07:42:32 +0000 (20:42 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 31 Dec 2012 07:42:32 +0000 (20:42 +1300)
commite65cf8d57ef7e00f37e1f85ad0f377932c3bc277
tree642301f5cbc45d76ba91e6edc0cc77a0ce44c534
parentf53156c2ec77640f3076722bbc3c8e73bd5d430d
squidpurge: fix META TLV parsing issues

* current Squid may stoe objects with up to 64KB URLs and 64KB headers
  in the disk cache. Increas the tool buffer to 128KB to prevent
  truncating the loaded meta data.

* check for and report when meta data overruns the end of loaded buffer
  content. Ignore the truncated TLV entry and produce a WARNING.

* validate the TLV size field loaded from disk to prevent buffer overrun
  errors from corrupted files on disk.

 Detected by Coverity Scan. Issues 740381, 740488.
tools/purge/purge.cc