texinfo-commits
[Top][All Lists]
Advanced

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

[5782] insert_text_into_node: copy 1 more byte


From: Gavin D. Smith
Subject: [5782] insert_text_into_node: copy 1 more byte
Date: Mon, 25 Aug 2014 17:27:00 +0000

Revision: 5782
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5782
Author:   gavin
Date:     2014-08-25 17:26:55 +0000 (Mon, 25 Aug 2014)
Log Message:
-----------
insert_text_into_node: copy 1 more byte

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/dir.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-08-25 16:39:01 UTC (rev 5781)
+++ trunk/ChangeLog     2014-08-25 17:26:55 UTC (rev 5782)
@@ -1,5 +1,10 @@
 2014-08-25  Gavin Smith  <address@hidden>
 
+       * info/dir.c (insert_text_into_node): Include terminating null byte
+       from node contents.
+
+2014-08-25  Gavin Smith  <address@hidden>
+
        * info/display.c (find_diff): Add braces round "if" command.
        (display_update_window_1): Remove unused variable.
        * info/session.c (isearch_terminate_search_key): Removed.

Modified: trunk/info/dir.c
===================================================================
--- trunk/info/dir.c    2014-08-25 16:39:01 UTC (rev 5781)
+++ trunk/info/dir.c    2014-08-25 17:26:55 UTC (rev 5782)
@@ -244,7 +244,7 @@
   contents = xmalloc (node->nodelen + textlen + 1);
   memcpy (contents, node->contents, start);
   memcpy (contents + start, text, textlen);
-  memcpy (contents + start + textlen, node->contents + start, end - start);
+  memcpy (contents + start + textlen, node->contents + start, end - start + 1);
   free (node->contents);
   node->contents = contents;
   node->nodelen += textlen;




reply via email to

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