From: adrian <> Date: Mon, 2 Oct 2006 07:31:59 +0000 (+0000) Subject: Fix an off-by-one bug in the UFS code. Thanks go to valgrind! X-Git-Tag: SQUID_3_0_PRE5~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e79ee7997abb4b11cc542207aa3268b4fb31c1a9;p=thirdparty%2Fsquid.git Fix an off-by-one bug in the UFS code. Thanks go to valgrind! --- diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index bd0df6f8e8..4d600e6a04 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -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",