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: mutt-1-7-1-rel~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5ef53f27a3e519c3dd2bd9f801410d6efd32541;p=mutt 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 ff74d688..6d8f3336 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++; }