]> granicus.if.org Git - neomutt/commitdiff
Fix gpgme segfault when querying candidates with a '+' in the address. (closes #3873)
authorAntonio Radici <antonio@dyne.org>
Tue, 20 Sep 2016 20:58:47 +0000 (13:58 -0700)
committerAntonio Radici <antonio@dyne.org>
Tue, 20 Sep 2016 20:58:47 +0000 (13:58 -0700)
list_to_pattern() was not allocating enough space for the '+' to '%2B'
transformation.

crypt-gpgme.c

index ff74d6888a33fc9039e20e724f2e1a52c3c6f71d..6d8f333681edaaa665f963a14da4d1a16c2a4a0d 100644 (file)
@@ -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++;
         }