]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-syntax - Return 0 for smtp_string_parse() with empty input.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 24 Mar 2020 21:42:15 +0000 (22:42 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 20 May 2020 05:26:26 +0000 (05:26 +0000)
This is what the current users of this function actually expect.

src/lib-smtp/smtp-syntax.c

index a8cead56c59229e38ef7095612d3df063c5399b6..214df59feac04665f328ad8670c83f65b8ff62cd 100644 (file)
@@ -23,7 +23,7 @@ int smtp_string_parse(const char *string, const char **value_r,
 
        if (string == NULL || *string == '\0') {
                *value_r = "";
-               return 1;
+               return 0;
        }
 
        smtp_parser_init(&parser, pool_datastack_create(), string);