dovecot-2.1: script: Don't add an empty parameter to executed co...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jul 31 22:30:29 EEST 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/1d9d799a2efc
changeset: 14642:1d9d799a2efc
user: Timo Sirainen <tss at iki.fi>
date: Tue Jul 31 22:30:19 2012 +0300
description:
script: Don't add an empty parameter to executed command line
Also fixed an error check
diffstat:
src/util/script.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r 817b69b2b21f -r 1d9d799a2efc src/util/script.c
--- a/src/util/script.c Tue Jul 31 22:03:00 2012 +0300
+++ b/src/util/script.c Tue Jul 31 22:30:19 2012 +0300
@@ -133,8 +133,8 @@
}
alarm(0);
- /* drop the last LF */
- buffer_set_used_size(input, scanpos-1);
+ /* drop the last two LFs */
+ buffer_set_used_size(input, scanpos-2);
args = t_strsplit(str_c(input), "\n");
script_verify_version(*args); args++;
@@ -148,7 +148,7 @@
exec_child(conn, args + 1);
i_unreached();
}
- if (*args == '\0')
+ if (**args == '\0')
i_fatal("empty options");
args++;
}
More information about the dovecot-cvs
mailing list