diff options
-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++; |