dovecot-1.2: str_append_unescaped() didn't unescape \\ correctly.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 16 20:39:49 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/e62afc5ef72f
changeset: 9138:e62afc5ef72f
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 1d343780e009 -r e62afc5ef72f 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