]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
bounds bug
authorwessels <>
Wed, 25 Feb 1998 04:43:45 +0000 (04:43 +0000)
committerwessels <>
Wed, 25 Feb 1998 04:43:45 +0000 (04:43 +0000)
src/stat.cc

index 2b763b00320cb38d186d0d323429d68b66cba32b..70a276633db76b48335d5f4478fe9f8ca3625523 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.204 1998/02/24 21:17:08 wessels Exp $
+ * $Id: stat.cc,v 1.205 1998/02/24 21:43:45 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -894,7 +894,9 @@ get_median_svc(int interval, int which)
     StatCounters *f;
     StatCounters *l;
     double x;
-
+    assert(interval > 0);
+    if (interval > N_COUNT_HIST - 1)
+       interval = N_COUNT_HIST - 1;
     f = &CountHist[0];
     l = &CountHist[interval];
     assert(f);