]> git.llucax.com Git - software/mutt-debian.git/blob - debian/patches/upstream/542910-search-segfault.patch
upstream/393926-internal-viewer.patch: revert the patch and add the auto_view of...
[software/mutt-debian.git] / debian / patches / upstream / 542910-search-segfault.patch
1 Fixes a segfault that happened when searching "~b something =", see upstream
2 bugs http://bugs.mutt.org/3314 and http://bugs.mutt.org/3315
3
4 --- a/pattern.c
5 +++ b/pattern.c
6 @@ -822,7 +822,13 @@
7        case '%':
8        case '=':
9        case '~':
10 -       if (*(ps.dptr + 1) == '(') 
11 +        if (!*(ps.dptr + 1))
12 +        {
13 +          snprintf (err->data, err->dsize, _("missing pattern: %s"), ps.dptr);
14 +          mutt_pattern_free (&curlist);
15 +          return NULL;
16 +        }
17 +        if (*(ps.dptr + 1) == '(')
18          {
19           ps.dptr ++; /* skip ~ */
20           p = find_matching_paren (ps.dptr + 1);