To: [email protected]
Subject: Patch 7.4b.012
Fcc: outbox
From: Bram Moolenaar <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4b.012
Problem:    Output from a shell command is truncated at a NUL. (lcd 47)
Solution:   Change every NUL into an SOH.
Files:      src/misc1.c
*** ../vim-7.4b.011/src/misc1.c 2013-07-05 19:44:45.000000000 +0200
--- src/misc1.c 2013-08-03 13:59:15.000000000 +0200
***************
*** 10887,10893 ****
--- 10887,10900 ----
       buffer = NULL;
     }
     else
+     {
+       /* Change NUL into SOH, otherwise the string is truncated. */
+       for (i = 0; i < len; ++i)
+           if (buffer[len] == NUL)
+               buffer[len] = 1;
+
       buffer[len] = NUL;      /* make sure the buffer is terminated */
+     }

 done:
     vim_free(tempname);
*** ../vim-7.4b.011/src/version.c       2013-08-03 13:41:12.000000000 +0200
--- src/version.c       2013-08-03 14:00:24.000000000 +0200
***************
*** 729,730 ****
--- 729,732 ----
 {   /* Add new patch number below this line */
+ /**/
+     12,
 /**/



--
It was recently discovered that research causes cancer in rats.

/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\\            help me help AIDS victims -- http://ICCF-Holland.org    ///