bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42673: 26.3; Return value of XGetIMValues not checked in xim_open_dp


From: Eli Zaretskii
Subject: bug#42673: 26.3; Return value of XGetIMValues not checked in xim_open_dpy (src/xterm.c)
Date: Sun, 02 Aug 2020 20:23:36 +0300

merge 42673 42676 42677
thanks

> From: Yichao Yu <yyc1992@gmail.com>
> Date: Sun, 2 Aug 2020 09:22:53 -0400
> Cc: Yichao Yu <yyc1992@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]