dovecot-2.0: auth: Don't crash if auth_cache_size has a very sma...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Wed Sep  8 16:56:20 EEST 2010
    
    
  
details:   http://hg.dovecot.org/dovecot-2.0/rev/9dc3c6de6e82
changeset: 12086:9dc3c6de6e82
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Sep 08 14:47:45 2010 +0100
description:
auth: Don't crash if auth_cache_size has a very small value.
diffstat:
 src/auth/auth-cache.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r af71d71e4b88 -r 9dc3c6de6e82 src/auth/auth-cache.c
--- a/src/auth/auth-cache.c	Wed Sep 08 14:47:28 2010 +0100
+++ b/src/auth/auth-cache.c	Wed Sep 08 14:47:45 2010 +0100
@@ -242,7 +242,7 @@
 		sizeof(node->data) + data_size;
 
 	/* make sure we have enough space */
-	while (cache->size_left < alloc_size)
+	while (cache->size_left < alloc_size && cache->tail != NULL)
 		auth_cache_node_destroy(cache, cache->tail);
 
 	node = hash_table_lookup(cache->hash, str_c(str));
    
    
More information about the dovecot-cvs
mailing list