Mailing List Archive

[6846] cherokee/trunk/cherokee/avl_flcache.c: Bug-fix: Front-Line Cache internals might access invalid memory.
Revision: 6846
http://svn.cherokee-project.com/changeset/6846
Author: alo
Date: 2011-09-14 12:16:57 +0200 (Wed, 14 Sep 2011)
Log Message:
-----------
Bug-fix: Front-Line Cache internals might access invalid memory.

Modified Paths:
--------------
cherokee/trunk/cherokee/avl_flcache.c

Modified: cherokee/trunk/cherokee/avl_flcache.c
===================================================================
--- cherokee/trunk/cherokee/avl_flcache.c 2011-09-14 09:21:01 UTC (rev 6845)
+++ cherokee/trunk/cherokee/avl_flcache.c 2011-09-14 10:16:57 UTC (rev 6846)
@@ -314,6 +314,13 @@
static int
node_is_empty (cherokee_avl_flcache_node_t *key)
{
+ /* The key object can be either be:
+ * 1.- A reference to a cherokee_connection_t object
+ * 2.- An object storing information
+ */
+ if (key->conn_ref)
+ return false;
+
return cherokee_buffer_is_empty (&key->request);
}