emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106309: Set members of the struct co


From: Kenichi Handa
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106309: Set members of the struct coding_system before accessing them (bug#9910, 9911, 9912).
Date: Mon, 07 Nov 2011 11:25:03 +0900
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106309 [merge]
committer: Kenichi Handa <address@hidden>
branch nick: trunk
timestamp: Mon 2011-11-07 11:25:03 +0900
message:
  Set members of the struct coding_system before accessing them 
(bug#9910,9911,9912).
modified:
  src/ChangeLog
  src/callproc.c
  src/coding.c
  src/process.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-11-06 23:38:01 +0000
+++ b/src/ChangeLog     2011-11-07 02:00:43 +0000
@@ -1,3 +1,14 @@
+2011-11-07  Kenichi Handa  <address@hidden>
+
+       * coding.c (coding_set_destination): Check coding->src_pos only
+       when coding->src_object is a buffer (bug#9910).
+
+       * process.c (send_process): Set the member src_multibyte of coding
+       to 0 (bug#9911) when sending a unibyte text.
+
+       * callproc.c (Fcall_process): Set the member src_multibyte of
+       process_coding to 0 (bug#9912).
+
 2011-11-06  YAMAMOTO Mitsuharu  <address@hidden>
 
        * xmenu.c (cleanup_widget_value_tree): New function.

=== modified file 'src/callproc.c'
--- a/src/callproc.c    2011-09-09 01:06:52 +0000
+++ b/src/callproc.c    2011-11-07 01:57:07 +0000
@@ -748,6 +748,7 @@
        val = raw_text_coding_system (val);
       setup_coding_system (val, &process_coding);
     }
+  process_coding.src_multibyte = 0;
 
   immediate_quit = 1;
   QUIT;

=== modified file 'src/coding.c'
--- a/src/coding.c      2011-07-28 20:31:29 +0000
+++ b/src/coding.c      2011-11-07 01:57:07 +0000
@@ -1043,7 +1043,7 @@
 {
   if (BUFFERP (coding->dst_object))
     {
-      if (coding->src_pos < 0)
+      if (BUFFERP (coding->src_object) && coding->src_pos < 0)
        {
          coding->destination = BEG_ADDR + coding->dst_pos_byte - BEG_BYTE;
          coding->dst_bytes = (GAP_END_ADDR

=== modified file 'src/process.c'
--- a/src/process.c     2011-10-29 00:12:02 +0000
+++ b/src/process.c     2011-11-07 01:57:07 +0000
@@ -5387,6 +5387,7 @@
     }
   else
     {
+      coding->src_multibyte = 0;
       /* For sending a unibyte text, character code conversion should
         not take place but EOL conversion should.  So, setup raw-text
         or one of the subsidiary if we have not yet done it.  */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]