gnu: Python 3.9: Fix CVE-2021-3177.
[jackhill/guix/guix.git] / gnu / packages / patches / emacs-ignore-empty-xim-styles.patch
1 Fix contributed upstream here:
2 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42694.
3
4 Index: emacs-26.3/src/xfns.c
5 ===================================================================
6 --- emacs-26.3.orig/src/xfns.c
7 +++ emacs-26.3/src/xfns.c
8 @@ -2628,6 +2628,8 @@ xic_free_xfontset (struct frame *f)
9 static XIMStyle
10 best_xim_style (XIMStyles *xim)
11 {
12 + if (xim == NULL) goto out;
13 +
14 int i, j;
15 int nr_supported = ARRAYELTS (supported_xim_styles);
16
17 @@ -2636,6 +2638,7 @@ best_xim_style (XIMStyles *xim)
18 if (supported_xim_styles[i] == xim->supported_styles[j])
19 return supported_xim_styles[i];
20
21 + out:
22 /* Return the default style. */
23 return XIMPreeditNothing | XIMStatusNothing;
24 }