dovecot: str_sanitize*() didn't properly limit string length.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Dec 2 14:06:20 EET 2007
details: http://hg.dovecot.org/dovecot/rev/e744479186b6
changeset: 6891:e744479186b6
user: Timo Sirainen <tss at iki.fi>
date: Sun Dec 02 14:05:45 2007 +0200
description:
str_sanitize*() didn't properly limit string length.
diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
src/lib/str-sanitize.c | 2 +-
diffs (12 lines):
diff -r 0ddc6511e9ff -r e744479186b6 src/lib/str-sanitize.c
--- a/src/lib/str-sanitize.c Sun Dec 02 13:39:25 2007 +0200
+++ b/src/lib/str-sanitize.c Sun Dec 02 14:05:45 2007 +0200
@@ -8,7 +8,7 @@ void str_sanitize_append(string_t *dest,
{
const char *p;
- for (p = src; *p != '\0'; p++) {
+ for (p = src; *p != '\0' && max_len > 0; p++, max_len--) {
if (((unsigned char)*p & 0x7f) < 32)
break;
}
More information about the dovecot-cvs
mailing list