------------------------------------------------------------ revno: 12433 revision-id: squid3@treenet.co.nz-20130101052845-elf1zhypbriwb6pf parent: squid3@treenet.co.nz-20121230074611-uwb2rze5859am4lj committer: Amos Jeffries branch nick: 3.3 timestamp: Mon 2012-12-31 22:28:45 -0700 message: Additional pieces of SQUID-2012:1 ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130101052845-elf1zhypbriwb6pf # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 2a68ecfc8d7456ad2ee69b2495ca1dd811431a04 # timestamp: 2013-01-01 05:54:48 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20121230074611-\ # uwb2rze5859am4lj # # Begin patch === modified file 'tools/cachemgr.cc' --- tools/cachemgr.cc 2012-11-24 02:17:56 +0000 +++ tools/cachemgr.cc 2013-01-01 05:28:45 +0000 @@ -978,10 +978,10 @@ // limit the input to something reasonable. // 4KB should be enough for the GET/POST data length, but may be extended. - size_t bufLen = (len >= 4096 ? len : 4095); + size_t bufLen = (len < 4096 ? len : 4095); char *buf = (char *)xmalloc(bufLen + 1); - size_t readLen = fread(buf, bufLen, 1, stdin); + size_t readLen = fread(buf, 1, bufLen, stdin); if (readLen == 0) { xfree(buf); return NULL; @@ -992,7 +992,7 @@ // purge the remainder of the request entity while (len > 0) { char temp[65535]; - readLen = fread(temp, 65535, 1, stdin); + readLen = fread(temp, 1, 65535, stdin); len -= readLen; }