]> git.notmuchmail.org Git - notmuch/commitdiff
crypto: return NULL cryptoctx if protocol string is empty.
authorJameson Graef Rollins <jrollins@finestructure.net>
Fri, 19 Jul 2013 15:36:12 +0000 (08:36 -0700)
committerDavid Bremner <bremner@debian.org>
Sat, 20 Jul 2013 12:13:48 +0000 (09:13 -0300)
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.)


No differences found