diff src/w32select.c @ 53798:ad0a7541533d

* w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe. * w32fns.c (x_to_w32_font): Likewise.
author Jason Rumney <jasonr@gnu.org>
date Tue, 03 Feb 2004 23:44:47 +0000
parents 695cf19ef79e
children 64d01f3f16e5
line wrap: on
line diff
--- a/src/w32select.c	Tue Feb 03 21:46:35 2004 +0000
+++ b/src/w32select.c	Tue Feb 03 23:44:47 2004 +0000
@@ -212,6 +212,11 @@
 	  }
 	coding.src_multibyte = 1;
 	coding.dst_multibyte = 0;
+	/* Need to set COMPOSITION_DISABLED, otherwise Emacs crashes in
+	   encode_coding_iso2022 trying to dereference a null pointer.  */
+	coding.composing = COMPOSITION_DISABLED;
+	if (coding.type == coding_type_iso2022)
+	  coding.flags |= CODING_FLAG_ISO_SAFE;
 	Vnext_selection_coding_system = Qnil;
 	coding.mode |= CODING_MODE_LAST_BLOCK;
 	bufsize = encoding_buffer_size (&coding, nbytes);