dovecot-2.2-pigeonhole: lib-sieve: Fixed datastack problem in me...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Wed May 15 22:59:37 EEST 2013


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/04ad3c2f0765
changeset: 1774:04ad3c2f0765
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Wed May 15 21:59:32 2013 +0200
description:
lib-sieve: Fixed datastack problem in message header composition.

diffstat:

 src/lib-sieve/rfc2822.c |  26 ++++++++++----------------
 1 files changed, 10 insertions(+), 16 deletions(-)

diffs (46 lines):

diff -r a32b12ab5ea6 -r 04ad3c2f0765 src/lib-sieve/rfc2822.c
--- a/src/lib-sieve/rfc2822.c	Thu May 09 16:39:41 2013 +0200
+++ b/src/lib-sieve/rfc2822.c	Wed May 15 21:59:32 2013 +0200
@@ -211,32 +211,26 @@
 void rfc2822_header_printf
 (string_t *header, const char *name, const char *fmt, ...)
 {
+	const char *body;
 	va_list args;
 
-	T_BEGIN {
-		const char *body;
+	va_start(args, fmt);
+	body = t_strdup_vprintf(fmt, args);
+	va_end(args);
 
-		va_start(args, fmt);
-		body = t_strdup_vprintf(fmt, args);
-		va_end(args);
-
-		rfc2822_header_write(header, name, body);
-	} T_END;
+	rfc2822_header_write(header, name, body);
 }
 
 void rfc2822_header_utf8_printf
 (string_t *header, const char *name, const char *fmt, ...)
 {
+	string_t *body = t_str_new(256);
 	va_list args;
 
-	T_BEGIN {
-		string_t *body = t_str_new(256);
+	va_start(args, fmt);
+	message_header_encode(t_strdup_vprintf(fmt, args), body);
+	va_end(args);
 
-		va_start(args, fmt);
-		message_header_encode(t_strdup_vprintf(fmt, args), body);
-		va_end(args);
-
-		rfc2822_header_write(header, name, str_c(body));
-	} T_END;
+	rfc2822_header_write(header, name, str_c(body));
 }
 


More information about the dovecot-cvs mailing list