diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-01-13 08:04:29 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-01-13 08:04:29 +0000 |
commit | d3850f75a016d3610f0170c7374a74ecad621851 (patch) | |
tree | e24b3b2b034088bad8d9403eb93c3d9dcd6f7364 /Build/source | |
parent | 671c56f896d842f33df4fb1d4289ccd9652c8544 (diff) |
dvipdfm-x: Bug fix (uninitialized variables)
git-svn-id: svn://tug.org/texlive/trunk@32648 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/dpxfile.c | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 124149cef59..28d30eb93d0 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,8 @@ +2014-01-13 Peter Breitenlohner <peb@mppmu.mpg.de> + + * dbxfile.c [WIN32]: Include <wchar.h>. Avoid use of + uninitialized variables cmdvw and qvw. + 2014-01-12 TANAKA Takuji <KXD02663@nifty.ne.jp> * dvipdfm.c: Add '--kpathsea-debug' option and diff --git a/Build/source/texk/dvipdfm-x/dpxfile.c b/Build/source/texk/dvipdfm-x/dpxfile.c index d6b7de4f8bf..9eaf7bbb259 100644 --- a/Build/source/texk/dvipdfm-x/dpxfile.c +++ b/Build/source/texk/dvipdfm-x/dpxfile.c @@ -48,6 +48,7 @@ #ifdef WIN32 #include <io.h> #include <process.h> +#include <wchar.h> #else #if HAVE_SYS_WAIT_H #include <sys/wait.h> @@ -246,6 +247,14 @@ static int exec_spawn (char *cmd) } *qvw = NULL; ret = _wspawnvp (_P_WAIT, *cmdvw, (const wchar_t* const*) cmdvw); + if (cmdvw) { + qvw = cmdvw; + while (*qvw) { + free (*qvw); + qvw++; + } + free (cmdvw); + } #else i = fork (); if (i < 0) @@ -268,16 +277,6 @@ done: qv++; } free (cmdv); -#ifdef WIN32 - if (cmdvw) { - qvw = cmdvw; - while (*qvw) { - free (*qvw); - qvw++; - } - free (cmdvw); - } -#endif return ret; } |