From: Antonio Radici Date: Tue, 20 Sep 2016 20:58:47 +0000 (-0700) Subject: Fix gpgme segfault when querying candidates with a '+' in the address. (closes #3873) X-Git-Tag: neomutt-20170225~32^2~117^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b87de09f50bc975843823a7ddad04b25b5fd8c1d;p=neomutt Fix gpgme segfault when querying candidates with a '+' in the address. (closes #3873) list_to_pattern() was not allocating enough space for the '+' to '%2B' transformation. --- diff --git a/crypt-gpgme.c b/crypt-gpgme.c index ff74d6888..6d8f33368 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -3708,7 +3708,7 @@ static char *list_to_pattern (LIST *list) { for(s = l->data; *s; s++) { - if (*s == '%') + if (*s == '%' || *s == '+') n += 2; n++; }