Skip to content

Commit 5715f25

Browse files
committed
updated for version 7.4b.012
Problem: Output from a shell command is truncated at a NUL. (lcd 47) Solution: Change every NUL into an SOH.
1 parent ee969eb commit 5715f25

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/misc1.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10887,7 +10887,14 @@ get_cmd_output(cmd, infile, flags)
1088710887
buffer = NULL;
1088810888
}
1088910889
else
10890+
{
10891+
/* Change NUL into SOH, otherwise the string is truncated. */
10892+
for (i = 0; i < len; ++i)
10893+
if (buffer[len] == NUL)
10894+
buffer[len] = 1;
10895+
1089010896
buffer[len] = NUL; /* make sure the buffer is terminated */
10897+
}
1089110898

1089210899
done:
1089310900
vim_free(tempname);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,8 @@ static char *(features[]) =
727727

728728
static int included_patches[] =
729729
{ /* Add new patch number below this line */
730+
/**/
731+
12,
730732
/**/
731733
11,
732734
/**/

0 commit comments

Comments
 (0)