dovecot-2.0: doveadm: Don't crash when giving only first word of...

dovecot at dovecot.org dovecot at dovecot.org
Thu May 13 14:01:32 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/9f1fb4978a4a
changeset: 11304:9f1fb4978a4a
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 13 13:01:14 2010 +0200
description:
doveadm: Don't crash when giving only first word of multi-word command.

diffstat:

 src/doveadm/doveadm-mail.c |  2 +-
 src/doveadm/doveadm.c      |  4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 5b628ee2888d -r 9f1fb4978a4a src/doveadm/doveadm-mail.c
--- a/src/doveadm/doveadm-mail.c	Thu May 13 12:47:56 2010 +0200
+++ b/src/doveadm/doveadm-mail.c	Thu May 13 13:01:14 2010 +0200
@@ -344,7 +344,7 @@
 {
 	unsigned int len;
 
-	if (argc < 1)
+	if (argc < 2)
 		return FALSE;
 
 	len = strlen(argv[1]);
diff -r 5b628ee2888d -r 9f1fb4978a4a src/doveadm/doveadm.c
--- a/src/doveadm/doveadm.c	Thu May 13 12:47:56 2010 +0200
+++ b/src/doveadm/doveadm.c	Thu May 13 13:01:14 2010 +0200
@@ -91,7 +91,7 @@
 {
 	unsigned int len;
 
-	if (argc < 1)
+	if (argc < 2)
 		return FALSE;
 
 	len = strlen(argv[1]);
@@ -150,7 +150,7 @@
 	mod_set.version = master_service_get_version_string(master_service);
 	mod_set.require_init_funcs = TRUE;
 	mod_set.debug = doveadm_debug;
-	mod_set.ignore_dlopen_errors = TRUE;
+	mod_set.ignore_dlopen_errors = !doveadm_debug;
 
 	modules = module_dir_load_missing(modules, DOVEADM_MODULEDIR,
 					  NULL, &mod_set);


More information about the dovecot-cvs mailing list