aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2011-11-07 10:57:07 +0900
committerKenichi Handa2011-11-07 10:57:07 +0900
commita0241d014e3d762bc7818d6cd8fd7c90bab3c538 (patch)
treea14ae98ada4e3490fecf36539f30ff4afb0ae8f8 /src
parent56c31147dce7a3b3c40792be5b115a2e6dbcfe1d (diff)
downloademacs-a0241d014e3d762bc7818d6cd8fd7c90bab3c538.tar.gz
emacs-a0241d014e3d762bc7818d6cd8fd7c90bab3c538.zip
Set members of the struct coding_system before accessing them (bug#9910,9911,9912).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog11
-rw-r--r--src/callproc.c1
-rw-r--r--src/coding.c2
-rw-r--r--src/process.c1
4 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f198f37d0c1..3af9590134c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
12011-11-07 Kenichi Handa <handa@m17n.org>
2
3 * coding.c (coding_set_destination): Check coding->src_pos only
4 when coding->src_object is a buffer (bug#9910).
5
6 * process.c (send_process): Set the member src_multibyte of coding
7 to 0 (bug#9911) when sending a unibyte text.
8
9 * callproc.c (Fcall_process): Set the member src_multibyte of
10 process_coding to 0 (bug#9912).
11
12011-11-03 Eli Zaretskii <eliz@gnu.org> 122011-11-03 Eli Zaretskii <eliz@gnu.org>
2 13
3 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947) 14 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
diff --git a/src/callproc.c b/src/callproc.c
index 97531f73848..0859aaef2e6 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -748,6 +748,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
748 val = raw_text_coding_system (val); 748 val = raw_text_coding_system (val);
749 setup_coding_system (val, &process_coding); 749 setup_coding_system (val, &process_coding);
750 } 750 }
751 process_coding.src_multibyte = 0;
751 752
752 immediate_quit = 1; 753 immediate_quit = 1;
753 QUIT; 754 QUIT;
diff --git a/src/coding.c b/src/coding.c
index 5fd59d394d9..79908e9b29b 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1043,7 +1043,7 @@ coding_set_destination (struct coding_system *coding)
1043{ 1043{
1044 if (BUFFERP (coding->dst_object)) 1044 if (BUFFERP (coding->dst_object))
1045 { 1045 {
1046 if (coding->src_pos < 0) 1046 if (BUFFERP (coding->src_object) && coding->src_pos < 0)
1047 { 1047 {
1048 coding->destination = BEG_ADDR + coding->dst_pos_byte - BEG_BYTE; 1048 coding->destination = BEG_ADDR + coding->dst_pos_byte - BEG_BYTE;
1049 coding->dst_bytes = (GAP_END_ADDR 1049 coding->dst_bytes = (GAP_END_ADDR
diff --git a/src/process.c b/src/process.c
index c316139a713..301274676d6 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5387,6 +5387,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5387 } 5387 }
5388 else 5388 else
5389 { 5389 {
5390 coding->src_multibyte = 0;
5390 /* For sending a unibyte text, character code conversion should 5391 /* For sending a unibyte text, character code conversion should
5391 not take place but EOL conversion should. So, setup raw-text 5392 not take place but EOL conversion should. So, setup raw-text
5392 or one of the subsidiary if we have not yet done it. */ 5393 or one of the subsidiary if we have not yet done it. */