diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2011-06-03 13:13:27 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2011-06-03 13:13:27 +0000 |
commit | 1058a967eb971e15a44d920cfaa93fad0c0b78b9 (patch) | |
tree | f17b4c9835f7fc914d2b2730fa416d851f5ff291 | |
parent | 412ad9ad1567b8a454eec11b800bed2ed0617f59 (diff) |
fix a bug in exec_spawn()
git-svn-id: svn://tug.org/texlive/trunk@22761 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/dvipdfmx/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/dvipdfmx/dvipdfmx-20110311/src/dpxfile.c | 23 |
2 files changed, 19 insertions, 8 deletions
diff --git a/Build/source/texk/dvipdfmx/ChangeLog b/Build/source/texk/dvipdfmx/ChangeLog index 1ed18d83fc0..48e5bc3f654 100644 --- a/Build/source/texk/dvipdfmx/ChangeLog +++ b/Build/source/texk/dvipdfmx/ChangeLog @@ -1,3 +1,7 @@ +2011-06-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * dpxfile.c: fix a bug in exec_spawn(). + 2011-06-03 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am (mapdata*): Do install the map file, still needed diff --git a/Build/source/texk/dvipdfmx/dvipdfmx-20110311/src/dpxfile.c b/Build/source/texk/dvipdfmx/dvipdfmx-20110311/src/dpxfile.c index b8267374bb4..16c81eaf503 100644 --- a/Build/source/texk/dvipdfmx/dvipdfmx-20110311/src/dpxfile.c +++ b/Build/source/texk/dvipdfmx/dvipdfmx-20110311/src/dpxfile.c @@ -154,7 +154,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) @@ -194,17 +194,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'))) { @@ -214,8 +218,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++; |