dovecot-2.0-pigeonhole: ManageSieve: fixed segfault bug in dovec...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Wed May 5 17:56:17 EEST 2010


details:   http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/e7b7dbe3797d
changeset: 1272:e7b7dbe3797d
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Wed May 05 16:56:12 2010 +0200
description:
ManageSieve: fixed segfault bug in doveconf plugin and fixed compiler warnings.

diffstat:

 src/managesieve-login/managesieve-login-settings.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 696c2dd83063 -r e7b7dbe3797d src/managesieve-login/managesieve-login-settings.c
--- a/src/managesieve-login/managesieve-login-settings.c	Wed May 05 16:04:31 2010 +0200
+++ b/src/managesieve-login/managesieve-login-settings.c	Wed May 05 16:56:12 2010 +0200
@@ -116,8 +116,8 @@
 
 typedef enum { CAP_SIEVE, CAP_NOTIFY } capability_type_t;
 
-static const char *capability_sieve = NULL;
-static const char *capability_notify = NULL;
+static char *capability_sieve = NULL;
+static char *capability_notify = NULL;
 
 void managesieve_login_settings_deinit(void)
 {
@@ -205,7 +205,7 @@
 	}
 
 	if ( pid == 0 ) {
-		const char *argv[1];
+		const char *argv[2];
 
 		/* Child */
 		(void)close(fd[0]);		
@@ -216,6 +216,7 @@
 		env_put("DUMP_CAPABILITY=1");
 
 		argv[0] = PKG_LIBEXECDIR"/managesieve"; /* BAD */
+		argv[1] = NULL;
 		execv_const(argv[0], argv);
 
 		i_fatal("managesieve-login: dump-capability execv(%s) failed: %m", argv[0]);


More information about the dovecot-cvs mailing list