httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r630786 - /httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c
Date Mon, 25 Feb 2008 10:04:38 GMT
Author: jorton
Date: Mon Feb 25 02:04:37 2008
New Revision: 630786

URL: http://svn.apache.org/viewvc?rev=630786&view=rev
Log:
* modules/ssl/ssl_scache_shmcb.c (shmcb_subcache_retrieve,
  shmcbc_subcache_remove): Restore check for idx->removed flag.

Found by: rpluem

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c?rev=630786&r1=630785&r2=630786&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c Mon Feb 25 02:04:37 2008
@@ -728,7 +728,8 @@
          * flag isn't set; check the data length too to avoid a buffer
          * overflow in case of corruption, which should be impossible,
          * but it's cheap to be safe. */
-        if (idx->id_len == idlen && (idx->data_used - idx->id_len) <
*destlen
+        if (!idx->removed
+            && idx->id_len == idlen && (idx->data_used - idx->id_len)
< *destlen
             && shmcb_cyclic_memcmp(header->subcache_data_size,
                                    SHMCB_DATA(header, subcache),
                                    idx->data_pos, id, idx->id_len) == 0) {
@@ -780,7 +781,7 @@
 
         /* Only consider 'idx' if the id matches, and the "removed"
          * flag isn't set. */
-        if (idx->id_len == idlen
+        if (!idx->removed && idx->id_len == idlen
             && shmcb_cyclic_memcmp(header->subcache_data_size,
                                    SHMCB_DATA(header, subcache),
                                    idx->data_pos, id, idx->id_len) == 0) {



Mime
View raw message