]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fixed message address assert-crashing if the entire input was invalid.
authorTimo Sirainen <tss@iki.fi>
Thu, 23 Oct 2008 22:56:13 +0000 (01:56 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 23 Oct 2008 22:56:13 +0000 (01:56 +0300)
Patch by Richard Platel.

--HG--
branch : HEAD

src/lib-mail/message-address.c

index d067e6496d9c7ec97c09fd8a068e319bb8382137..a75947d9d3ec6c3ef6bedf9d65d3c23b365b9467 100644 (file)
@@ -314,8 +314,7 @@ message_address_parse_real(pool_t pool, const unsigned char *data, size_t size,
        ctx.str = t_str_new(128);
        ctx.fill_missing = fill_missing;
 
-       ret = rfc822_skip_lwsp(&ctx.parser);
-       if (ret == 0) {
+       if (rfc822_skip_lwsp(&ctx.parser) <= 0) {
                /* no addresses */
                return NULL;
        }