dovecot-2.2: dict-redis: Don't crash when receiving invalid inpu...

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 23 15:16:59 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/a18a53f242ba
changeset: 16870:a18a53f242ba
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 23 15:16:52 2013 +0300
description:
dict-redis: Don't crash when receiving invalid input instead of expected $size.

diffstat:

 src/lib-dict/dict-redis.c |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (13 lines):

diff -r 2089c4b637b9 -r a18a53f242ba src/lib-dict/dict-redis.c
--- a/src/lib-dict/dict-redis.c	Wed Oct 23 14:59:57 2013 +0300
+++ b/src/lib-dict/dict-redis.c	Wed Oct 23 15:16:52 2013 +0300
@@ -137,8 +137,7 @@
 		if (line[0] != '$' || str_to_uint(line+1, &conn->bytes_left) < 0) {
 			i_error("redis: Unexpected input (wanted $size): %s",
 				line);
-			redis_conn_destroy(&conn->conn);
-			return 1;
+			return -1;
 		}
 		conn->bytes_left += 2; /* include trailing CRLF */
 	}


More information about the dovecot-cvs mailing list