summaryrefslogtreecommitdiff
path: root/src/w32select.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2004-02-03 23:44:47 +0000
committerJason Rumney <jasonr@gnu.org>2004-02-03 23:44:47 +0000
commit2883d84228b07da8276569258cee4eafebc10c35 (patch)
tree4359188c65e9d3bdc0fb0311af375fd6d7ad3de7 /src/w32select.c
parent95e224b7e32edf56ad482832775eb814e2e7a36c (diff)
downloademacs-2883d84228b07da8276569258cee4eafebc10c35.tar.gz
* w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe.
* w32fns.c (x_to_w32_font): Likewise.
Diffstat (limited to 'src/w32select.c')
-rw-r--r--src/w32select.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/w32select.c b/src/w32select.c
index 6533f4b660d..940cce35772 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -212,6 +212,11 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
}
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);