# HG changeset patch # User Jason Rumney # Date 1075851887 0 # Node ID ad0a7541533dd37d89a23aff370f203148af1d85 # Parent 1f2fa74fb0aaa47680f7c745eb962fb9b6d25b0f * w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe. * w32fns.c (x_to_w32_font): Likewise. diff -r 1f2fa74fb0aa -r ad0a7541533d src/ChangeLog --- a/src/ChangeLog Tue Feb 03 21:46:35 2004 +0000 +++ b/src/ChangeLog Tue Feb 03 23:44:47 2004 +0000 @@ -1,3 +1,9 @@ +2004-02-03 Jason Rumney + + * w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe. + + * w32fns.c (x_to_w32_font): Likewise. + 2004-02-03 Jan Dj,Ad(Brv * xterm.h: Add x_handle_dnd_message, x_check_property_data, diff -r 1f2fa74fb0aa -r ad0a7541533d src/w32fns.c --- a/src/w32fns.c Tue Feb 03 21:46:35 2004 +0000 +++ b/src/w32fns.c Tue Feb 03 23:44:47 2004 +0000 @@ -5558,6 +5558,11 @@ (Fcheck_coding_system (Vlocale_coding_system), &coding); coding.src_multibyte = 1; coding.dst_multibyte = 1; + /* 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; bufsize = encoding_buffer_size (&coding, strlen (name)); buf = (unsigned char *) alloca (bufsize); coding.mode |= CODING_MODE_LAST_BLOCK; diff -r 1f2fa74fb0aa -r ad0a7541533d src/w32select.c --- 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);