]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix buffer overwrite when pconn idle list is full
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 7 Dec 2010 02:30:31 +0000 (15:30 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 7 Dec 2010 02:30:31 +0000 (15:30 +1300)
src/pconn.cc

index 386ecfb9b564586a9c715400bb9edcaac539aa68..1c6a2bbf723a942278009f9c143345c18fcf0439 100644 (file)
@@ -104,7 +104,7 @@ IdleConnList::removeAt(int index)
     // shuffle the remaining entries to fill the new gap.
     for (; index < size_ - 1; index++)
         theList_[index] = theList_[index + 1];
-    theList_[size_] = NULL;
+    theList_[size_-1] = NULL;
 
     if (--size_ == 0) {
         debugs(48, 3, HERE << "deleting " << hashKeyStr(&hash));