diff options
author | Leo Prikler <leo.prikler@student.tugraz.at> | 2020-08-02 20:46:58 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-03 12:26:02 +0200 |
commit | f574f859ee7343d894ecf7318fa53b7a73426775 (patch) | |
tree | c15e4f6da7add170970ee2168946611078fe7eed /gnu/packages/patches | |
parent | 87194d5783c1848b44a0596432cb66940d7874d2 (diff) | |
download | guix-f574f859ee7343d894ecf7318fa53b7a73426775.tar.gz |
gnu: emacs: Ignore empty XIM styles.
As of libx11 version 1.6.10, xim may be NULL, which causes a segmentation fault in the execution of ARRAYELTS. As a cautionary measure, we short-circuit this logic. * gnu/packages/patches/emacs-ignore-empty-xim-styles.patch: New file. * gnu/packages/emacs.scm (emacs emacs-next)[patches]: Use it. * gnu/local.mk: Register it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/emacs-ignore-empty-xim-styles.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch b/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch new file mode 100644 index 0000000000..606d3ece6f --- /dev/null +++ b/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch @@ -0,0 +1,24 @@ +Fix contributed upstream here: +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42694. + +Index: emacs-26.3/src/xfns.c +=================================================================== +--- emacs-26.3.orig/src/xfns.c ++++ emacs-26.3/src/xfns.c +@@ -2533,6 +2533,8 @@ xic_free_xfontset (struct frame *f) + static XIMStyle + best_xim_style (XIMStyles *xim) + { ++ if (xim == NULL) goto out; ++ + int i, j; + int nr_supported = ARRAYELTS (supported_xim_styles); + +@@ -2541,6 +2543,7 @@ best_xim_style (XIMStyles *xim) + if (supported_xim_styles[i] == xim->supported_styles[j]) + return supported_xim_styles[i]; + ++ out: + /* Return the default style. */ + return XIMPreeditNothing | XIMStatusNothing; + } |