From: Amos Jeffries Date: Mon, 7 Oct 2013 10:36:47 +0000 (-0600) Subject: Fix signedness comparison in SBuf X-Git-Tag: SQUID_3_5_0_1~607 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a24b67f758c6d192a1c5de32a98279c69cb7d12f;p=thirdparty%2Fsquid.git Fix signedness comparison in SBuf --- diff --git a/src/SBuf.h b/src/SBuf.h index 7a073640ec..cf07a3015d 100644 --- a/src/SBuf.h +++ b/src/SBuf.h @@ -417,7 +417,7 @@ public: * \throw SBufTooBigException if the user tries to allocate too big a SBuf */ void reserveSpace(size_type minSpace) { - Must(0 <= minSpace); + Must(minSpace < maxSize); Must(length() <= maxSize - minSpace); reserveCapacity(length()+minSpace); }