dovecot-1.1: str_append_unescaped() didn't unescape \\ correctly.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 16 20:39:52 EEST 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/32d649173bef
changeset: 8310:32d649173bef
user: Timo Sirainen <tss at iki.fi>
date: Tue Jun 16 13:39:40 2009 -0400
description:
str_append_unescaped() didn't unescape \\ correctly.
The function wasn't used anywhere in Dovecot though.
diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
src/lib/strescape.c | 7 +++++--
diffs (17 lines):
diff -r 2b557de3fb25 -r 32d649173bef src/lib/strescape.c
--- a/src/lib/strescape.c Mon Jun 15 23:14:25 2009 -0400
+++ b/src/lib/strescape.c Tue Jun 16 13:39:40 2009 -0400
@@ -44,8 +44,11 @@ void str_append_unescaped(string_t *dest
str_append_n(dest, src_c + start, i-start);
- if (i < src_size)
- i++;
+ if (i < src_size) {
+ if (++i == src_size)
+ break;
+ str_append_c(dest, src_c[i++]);
+ }
start = i;
}
}
More information about the dovecot-cvs
mailing list