]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
push-notification: Fix crash with empty from/to header
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 13 Dec 2019 11:35:06 +0000 (13:35 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 13 Dec 2019 12:52:12 +0000 (14:52 +0200)
src/plugins/push-notification/push-notification-event-message-common.c

index 406ce81eb0d98e3881956e4056613b08b8bb3414..9c70756b21ce6c3cef70d90d6c6335943673a58c 100644 (file)
@@ -18,6 +18,9 @@ static void decode_address_header(pool_t pool, const char *hdr,
 
        addr = message_address_parse(pool_datastack_create(),
                (const unsigned char *)hdr, strlen(hdr), 1, 0);
+       if (addr == NULL)
+               return;
+
        display_name = addr->name;
        if (addr->domain == NULL) {
                /* group */