Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 927b2e27eb4d289c88ad87f4a2fdfa8f > files > 6

dovecot-1.0.7-9.el5_11.4.src.rpm

diff -up dovecot-1.0.7/src/lib-mail/message-parser.c.CVE-2011-1929 dovecot-1.0.7/src/lib-mail/message-parser.c
--- dovecot-1.0.7/src/lib-mail/message-parser.c.CVE-2011-1929	2007-10-28 02:09:23.000000000 +0200
+++ dovecot-1.0.7/src/lib-mail/message-parser.c	2011-08-08 13:34:24.994305372 +0200
@@ -940,7 +940,9 @@ int message_parse_header_next(struct mes
 		line->middle_len = (size_t)(line->value - line->middle);
 
 		str_truncate(ctx->name, 0);
-		str_append_n(ctx->name, msg, colon_pos);
+		/* use buffer_append() so the name won't be truncated if there
+		    are NULs. */
+		buffer_append(ctx->name, msg, colon_pos);
 		line->name = str_c(ctx->name);
 		line->name_len = str_len(ctx->name);
 	}