From: Timo Sirainen Date: Tue, 9 Aug 2011 17:44:34 +0000 (+0300) Subject: script: Be sure to handle LF+LF properly. X-Git-Tag: 2.1.alpha1~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f68fa8a117642e2c134a29d8e35569bce6c3158;p=thirdparty%2Fdovecot%2Fcore.git script: Be sure to handle LF+LF properly. --- diff --git a/src/plugins/quota/quota.c b/src/plugins/quota/quota.c index 874bf9679d..e67a501820 100644 --- a/src/plugins/quota/quota.c +++ b/src/plugins/quota/quota.c @@ -992,7 +992,7 @@ static void quota_warning_execute(struct quota_root *root, const char *cmd) if (root->quota->set->debug) i_debug("quota: Executing warning: %s", cmd); - args = t_strsplit(cmd, " "); + args = t_strsplit_spaces(cmd, " "); socket_path = args[0]; args++; diff --git a/src/util/script.c b/src/util/script.c index babf9a1561..53c6c60f88 100644 --- a/src/util/script.c +++ b/src/util/script.c @@ -78,7 +78,7 @@ static bool client_exec_script(struct master_service_connection *conn) /* Input contains: VERSION .. - [] + | "-" arg 1 arg 2 @@ -142,6 +142,8 @@ static bool client_exec_script(struct master_service_connection *conn) exec_child(conn, args + 1); i_unreached(); } + if (*args == '\0') + i_fatal("empty options"); args++; }