dovecot-1.2: master: Startup errors crashed on some systems.

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 7 18:47:03 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/5f9782109fcf
changeset: 9370:5f9782109fcf
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 07 11:46:51 2009 -0400
description:
master: Startup errors crashed on some systems.

diffstat:

1 file changed, 8 insertions(+), 4 deletions(-)
src/master/main.c |   12 ++++++++----

diffs (29 lines):

diff -r cc0d7c00c6ce -r 5f9782109fcf src/master/main.c
--- a/src/master/main.c	Mon Sep 07 11:44:38 2009 -0400
+++ b/src/master/main.c	Mon Sep 07 11:46:51 2009 -0400
@@ -143,8 +143,10 @@ tee_fatal_handler(enum log_type type, in
 tee_fatal_handler(enum log_type type, int status, const char *fmt, va_list args)
 {
 	const struct settings *set = settings_root->defaults;
-
-	fprintf(stderr, "Fatal: %s\n", t_strdup_vprintf(fmt, args));
+	va_list args2;
+
+	VA_COPY(args2, args);
+	fprintf(stderr, "Fatal: %s\n", t_strdup_vprintf(fmt, args2));
 
 	if (*set->log_path == '\0') {
 		i_syslog_fatal_handler(type, status, fmt, args);
@@ -157,8 +159,10 @@ tee_error_handler(enum log_type type, co
 tee_error_handler(enum log_type type, const char *fmt, va_list args)
 {
 	const struct settings *set = settings_root->defaults;
-
-	fprintf(stderr, "Error: %s\n", t_strdup_vprintf(fmt, args));
+	va_list args2;
+
+	VA_COPY(args2, args);
+	fprintf(stderr, "Error: %s\n", t_strdup_vprintf(fmt, args2));
 
 	if (*set->log_path == '\0') {
 		i_syslog_error_handler(type, fmt, args);


More information about the dovecot-cvs mailing list