GNU bug report logs -
#42673
26.3; Return value of XGetIMValues not checked in xim_open_dpy (src/xterm.c)
Previous Next
Reported by: Yichao Yu <yyc1992 <at> gmail.com>
Date: Sun, 2 Aug 2020 13:24:01 UTC
Severity: normal
Merged with 42676,
42677
Found in versions 26.3, 27.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
merge 42673 42676 42677
thanks
> From: Yichao Yu <yyc1992 <at> gmail.com>
> Date: Sun, 2 Aug 2020 09:22:53 -0400
> Cc: Yichao Yu <yyc1992 <at> gmail.com>
>
> The call in question is at
> https://git.savannah.gnu.org/cgit/emacs.git/tree/src/xterm.c?id=9fe2bdb88a4ebd4b2286c1c2a2a2ba7411af01b6#n10316
> Since the return value isn't checked, a failure to initialize here can
> cause `dpyinfo->xim_styles` to be `NULL` which intern cause readers
> like https://git.savannah.gnu.org/cgit/emacs.git/tree/src/xfns.c?id=9fe2bdb88a4ebd4b2286c1c2a2a2ba7411af01b6#n2659
> to pass a `NULL` pointer to `best_xim_style` and crash.
>
> The fix is to check if the return value of `XGetIMValues` is not
> `NULL` and if it is not `NULL`, disable XIM.
Thanks, other people also reported this, so this is now fixed on the
emacs-27 branch.
This bug report was last modified 4 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.