From b87de09f50bc975843823a7ddad04b25b5fd8c1d Mon Sep 17 00:00:00 2001 From: Antonio Radici Date: Tue, 20 Sep 2016 13:58:47 -0700 Subject: [PATCH] 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. --- crypt-gpgme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++; } -- 2.50.1