]> granicus.if.org Git - apache/commitdiff
off by 1 error
authorJim Jagielski <jim@apache.org>
Wed, 13 May 2009 18:59:48 +0000 (18:59 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 13 May 2009 18:59:48 +0000 (18:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774493 13f79535-47bb-0310-9956-ffa450edef68

modules/mem/mod_plainmem.c

index 33e63eb0b8979b15dce2fa6648735c3e06a2a947..848f52026c7eb78dac01fd1aea2e005dc0f20693 100644 (file)
@@ -139,7 +139,7 @@ static apr_status_t slotmem_mem(ap_slotmem_t *score, unsigned int id, void **mem
 
     if (!score)
         return APR_ENOSHMAVAIL;
-    if (id < 0 || id > score->num)
+    if (id < 0 || id >= score->num)
         return APR_ENOSHMAVAIL;
 
     ptr = score->base + score->size * id;