------------------------------------------------------------ revno: 11743 revision-id: squid3@treenet.co.nz-20130101052914-r4lk62270w4sh498 parent: squid3@treenet.co.nz-20121230074717-y9oekp0bfabt6szv committer: Amos Jeffries branch nick: 3.2 timestamp: Mon 2012-12-31 22:29:14 -0700 message: Additional pieces of SQUID-2012:1 ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130101052914-r4lk62270w4sh498 # target_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # testament_sha1: 3cf80543cf33a78ae27d5178a8e9958854350ca3 # timestamp: 2013-01-01 05:35:26 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # base_revision_id: squid3@treenet.co.nz-20121230074717-\ # y9oekp0bfabt6szv # # Begin patch === modified file 'tools/cachemgr.cc' --- tools/cachemgr.cc 2012-11-29 11:15:32 +0000 +++ tools/cachemgr.cc 2013-01-01 05:29:14 +0000 @@ -980,10 +980,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; @@ -994,7 +994,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; }