summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2007-01-05 13:18:20 +0000
committerTaco Hoekwater <taco@elvenkind.com>2007-01-05 13:18:20 +0000
commitdc562290a5a164285ef63c96de55755c072f89ea (patch)
tree968053a5a8b6d38b8554042efe50da6f82e90905 /Build
parent7a5c87031fb8706bba1fe49affaef9fdd5a9fb96 (diff)
xmalloc an extra byte for the NUL after nameoffile (pipes)
git-svn-id: svn://tug.org/texlive/trunk@3153 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 2b5e5a83046..12307761463 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -1350,7 +1350,7 @@ open_in_or_pipe P3C(FILE **, f_ptr, int, filefmt, const_string, fopen_mode)
if (shellenabledp && *(nameoffile+1) == '|') {
/* the user requested a pipe */
*f_ptr = NULL;
- fname = (string)xmalloc(strlen((const_string)(nameoffile+1)));
+ fname = (string)xmalloc(strlen((const_string)(nameoffile+1))+1);
strcpy(fname,(const_string)(nameoffile+1));
#if !defined(pdfTeX) && !defined(pdfeTeX)
if (fullnameoffile)
@@ -1389,7 +1389,7 @@ open_out_or_pipe P2C(FILE **, f_ptr, const_string, fopen_mode)
if (shellenabledp && *(nameoffile+1) == '|') {
/* the user requested a pipe */
- fname = (string)xmalloc(strlen((const_string)(nameoffile+1)));
+ fname = (string)xmalloc(strlen((const_string)(nameoffile+1))+1);
strcpy(fname,(const_string)(nameoffile+1));
if (strchr (fname,' ')==NULL && strchr(fname,'>')==NULL) {
/* mp and mf currently do not use this code, but it