From: Timo Sirainen Date: Fri, 13 Dec 2019 11:35:06 +0000 (+0200) Subject: push-notification: Fix crash with empty from/to header X-Git-Tag: 2.3.9.2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dec8cd80453207f6676fe0863fb7903c98b31d5d;p=thirdparty%2Fdovecot%2Fcore.git push-notification: Fix crash with empty from/to header --- diff --git a/src/plugins/push-notification/push-notification-event-message-common.c b/src/plugins/push-notification/push-notification-event-message-common.c index 406ce81eb0..9c70756b21 100644 --- a/src/plugins/push-notification/push-notification-event-message-common.c +++ b/src/plugins/push-notification/push-notification-event-message-common.c @@ -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 */