]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix an off-by-one bug in the UFS code. Thanks go to valgrind!
authoradrian <>
Mon, 2 Oct 2006 07:31:59 +0000 (07:31 +0000)
committeradrian <>
Mon, 2 Oct 2006 07:31:59 +0000 (07:31 +0000)
src/fs/ufs/store_dir_ufs.cc

index bd0df6f8e80c911bd7ca55194bee0e164af367ee..4d600e6a04c2ab8c665b911b833d7a8bcd63d140 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.cc,v 1.76 2006/09/14 00:51:12 robertc Exp $
+ * $Id: store_dir_ufs.cc,v 1.77 2006/10/02 01:31:59 adrian Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -931,7 +931,7 @@ UFSCleanLog::write(StoreEntry const &e)
     outbuf_offset += ss;
     /* buffered write */
 
-    if (outbuf_offset + ss > CLEAN_BUF_SZ) {
+    if (outbuf_offset + ss >= CLEAN_BUF_SZ) {
         if (FD_WRITE_METHOD(fd, outbuf, outbuf_offset) < 0) {
             /* XXX This error handling should probably move up to the caller */
             debug(50, 0) ("storeDirWriteCleanLogs: %s: write: %s\n",