* src/xfns.c (xic_preedit_draw_callback):
* src/xterm.c (handle_one_xevent): Don't pass invalid coding
systems to `setup_coding_system'.
if (!output->preedit_active)
return;
+ /* If we don't bail out here then GTK can crash
+ from the resulting signal in `setup_coding_system'. */
+ if (NILP (Fcoding_system_p (Vlocale_coding_system)))
+ {
+ text = NULL;
+ goto im_abort;
+ }
+
if (call_data->text)
text = x_xim_text_to_utf8_unix (call_data->text, &text_length);
else
if (nchars < nbytes)
{
+ /* If we don't bail out here then GTK can crash
+ from the resulting signal in `setup_coding_system'. */
+ if (NILP (Fcoding_system_p (coding_system)))
+ goto done_keysym;
+
/* Decode the input data. */
/* The input should be decoded with `coding_system'
if (nchars < nbytes)
{
+ /* If we don't bail out here then GTK can crash
+ from the resulting signal in `setup_coding_system'. */
+ if (NILP (Fcoding_system_p (Vlocale_coding_system)))
+ goto xi_done_keysym;
+
/* Decode the input data. */
setup_coding_system (Vlocale_coding_system, &coding);