diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2011-06-03 13:02:25 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2011-06-03 13:02:25 +0000 |
commit | 412ad9ad1567b8a454eec11b800bed2ed0617f59 (patch) | |
tree | dd041a99ed0333135483cbfb8e895ffda5512bea /Build | |
parent | 69393d08f697be1b3e8afecc90e320ba2deb6df9 (diff) |
fix a bug in exec_spawn()
git-svn-id: svn://tug.org/texlive/trunk@22760 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/xdvipdfmx/ChangeLog.TL | 4 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dpxfile.c | 23 |
2 files changed, 19 insertions, 8 deletions
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog.TL b/Build/source/texk/xdvipdfmx/ChangeLog.TL index dcf09d49d4a..0ba93958a71 100644 --- a/Build/source/texk/xdvipdfmx/ChangeLog.TL +++ b/Build/source/texk/xdvipdfmx/ChangeLog.TL @@ -1,6 +1,10 @@ ChangeLog.TL: TeX Live (TL) changes for xdvipdfmx ================================================= +2011-06-03 Akira Kakuto <kakuto@fuk,kindai.ac.jp> + + * dpxfile.c: fix a bug in exec_spawn(). + 2011-04-18 Peter Breitenlohner <peb@mppmu.mpg.de> * src/fontmap.c [OS X]: #include FT_MAC_H to get prototype for diff --git a/Build/source/texk/xdvipdfmx/src/dpxfile.c b/Build/source/texk/xdvipdfmx/src/dpxfile.c index e7cbf85a54d..c68fdce21aa 100644 --- a/Build/source/texk/xdvipdfmx/src/dpxfile.c +++ b/Build/source/texk/xdvipdfmx/src/dpxfile.c @@ -156,7 +156,7 @@ static int exec_spawn (char *cmd) { char **cmdv, **qv; char *p, *pp; - char buf[512]; + char buf[1024]; int i, ret; if (!cmd || !*cmd) @@ -196,17 +196,21 @@ static int exec_spawn (char *cmd) } p++; } else { - while (*p != ' ' && *p != '\t' && *p) -#ifdef WIN32 + while (*p != ' ' && *p != '\t' && *p) { if (*p == '\'') { - *pp++ = '\"'; + p++; + while (*p != '\'') { + if (*p == '\0') { + free (cmdv); + return -1; + } + *pp++ = *p++; + } p++; } else { *pp++ = *p++; } -#else - *pp++ = *p++; -#endif + } } *pp = '\0'; if ((pp = strchr (buf, ' ')) || (pp = strchr (buf, '\t'))) { @@ -216,8 +220,11 @@ static int exec_spawn (char *cmd) *qv = concat3 ("'", buf, "'"); #endif } else { - *qv = concat (buf, ""); + *qv = xstrdup (buf); } +/* + fprintf(stderr,"\n%s", *qv); +*/ while (*p == ' ' || *p == '\t') p++; qv++; |