]> 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)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 1 Apr 2020 08:49:24 +0000 (11:49 +0300)
This is what the current users of this function actually expect.

src/lib-smtp/smtp-syntax.c

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