]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix signedness comparison in SBuf
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 7 Oct 2013 10:36:47 +0000 (04:36 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 7 Oct 2013 10:36:47 +0000 (04:36 -0600)
src/SBuf.h

index 7a073640ec32d201b23c4dbbf45fb416f4ea55f6..cf07a3015d22392c2c78853b9700accf492b8f75 100644 (file)
@@ -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);
     }