From: Jameson Graef Rollins Date: Fri, 19 Jul 2013 15:36:12 +0000 (-0700) Subject: crypto: return NULL cryptoctx if protocol string is empty. X-Git-Tag: 0.16_rc1~12 X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=348437243c861cc355f10e548a7a973a60299a25;hp=348437243c861cc355f10e548a7a973a60299a25;p=notmuch crypto: return NULL cryptoctx if protocol string is empty. Badly formed messages that don't specify a protocol in signed/encrypted parts, end up with a protocol of NULL. strcasecmp in notmuch_crypto_get_context then segfaults when trying to check it against known protocols. If the protocol is NULL, just return an empty context immediately (with appropriate message.) ---