aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2004-02-03 23:44:47 +0000
committerJason Rumney2004-02-03 23:44:47 +0000
commit2883d84228b07da8276569258cee4eafebc10c35 (patch)
tree4359188c65e9d3bdc0fb0311af375fd6d7ad3de7
parent95e224b7e32edf56ad482832775eb814e2e7a36c (diff)
downloademacs-2883d84228b07da8276569258cee4eafebc10c35.tar.gz
emacs-2883d84228b07da8276569258cee4eafebc10c35.zip
* w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe.
* w32fns.c (x_to_w32_font): Likewise.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/w32fns.c5
-rw-r--r--src/w32select.c5
3 files changed, 16 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4bda31d9a01..1e44a98d42d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12004-02-03 Jason Rumney <jasonr@gnu.org>
2
3 * w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe.
4
5 * w32fns.c (x_to_w32_font): Likewise.
6
12004-02-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 72004-02-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 8
3 * xterm.h: Add x_handle_dnd_message, x_check_property_data, 9 * xterm.h: Add x_handle_dnd_message, x_check_property_data,
diff --git a/src/w32fns.c b/src/w32fns.c
index 1854c3908bd..f296c171595 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5558,6 +5558,11 @@ x_to_w32_font (lpxstr, lplogfont)
5558 (Fcheck_coding_system (Vlocale_coding_system), &coding); 5558 (Fcheck_coding_system (Vlocale_coding_system), &coding);
5559 coding.src_multibyte = 1; 5559 coding.src_multibyte = 1;
5560 coding.dst_multibyte = 1; 5560 coding.dst_multibyte = 1;
5561 /* Need to set COMPOSITION_DISABLED, otherwise Emacs crashes in
5562 encode_coding_iso2022 trying to dereference a null pointer. */
5563 coding.composing = COMPOSITION_DISABLED;
5564 if (coding.type == coding_type_iso2022)
5565 coding.flags |= CODING_FLAG_ISO_SAFE;
5561 bufsize = encoding_buffer_size (&coding, strlen (name)); 5566 bufsize = encoding_buffer_size (&coding, strlen (name));
5562 buf = (unsigned char *) alloca (bufsize); 5567 buf = (unsigned char *) alloca (bufsize);
5563 coding.mode |= CODING_MODE_LAST_BLOCK; 5568 coding.mode |= CODING_MODE_LAST_BLOCK;
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,
212 } 212 }
213 coding.src_multibyte = 1; 213 coding.src_multibyte = 1;
214 coding.dst_multibyte = 0; 214 coding.dst_multibyte = 0;
215 /* Need to set COMPOSITION_DISABLED, otherwise Emacs crashes in
216 encode_coding_iso2022 trying to dereference a null pointer. */
217 coding.composing = COMPOSITION_DISABLED;
218 if (coding.type == coding_type_iso2022)
219 coding.flags |= CODING_FLAG_ISO_SAFE;
215 Vnext_selection_coding_system = Qnil; 220 Vnext_selection_coding_system = Qnil;
216 coding.mode |= CODING_MODE_LAST_BLOCK; 221 coding.mode |= CODING_MODE_LAST_BLOCK;
217 bufsize = encoding_buffer_size (&coding, nbytes); 222 bufsize = encoding_buffer_size (&coding, nbytes);