emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116158: Fix crash with insert-file-contents and mis


From: Paul Eggert
Subject: [Emacs-diffs] trunk r116158: Fix crash with insert-file-contents and misdecoded text.
Date: Sun, 26 Jan 2014 00:32:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116158
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16286
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sat 2014-01-25 16:32:30 -0800
message:
  Fix crash with insert-file-contents and misdecoded text.
  
  * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
  before invoking decode_coding_gap, since there's just one block.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/fileio.c                   fileio.c-20091113204419-o5vbwnq5f7feedwu-210
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-01-25 14:39:49 +0000
+++ b/src/ChangeLog     2014-01-26 00:32:30 +0000
@@ -1,3 +1,9 @@
+2014-01-26  Paul Eggert  <address@hidden>
+
+       Fix crash with insert-file-contents and misdecoded text (Bug#16286).
+       * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
+       before invoking decode_coding_gap, since there's just one block.
+
 2014-01-25  Martin Rudalics  <address@hidden>
 
        Fix handling of face attributes in Fx_create_frame (Bug#16529).

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2014-01-03 06:47:27 +0000
+++ b/src/fileio.c      2014-01-26 00:32:30 +0000
@@ -4298,6 +4298,7 @@
       Z_BYTE -= inserted;
       ZV -= inserted;
       Z -= inserted;
+      coding.mode |= CODING_MODE_LAST_BLOCK;
       decode_coding_gap (&coding, inserted, inserted);
       inserted = coding.produced_char;
       coding_system = CODING_ID_NAME (coding.id);


reply via email to

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