From d3850f75a016d3610f0170c7374a74ecad621851 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Mon, 13 Jan 2014 08:04:29 +0000 Subject: dvipdfm-x: Bug fix (uninitialized variables) git-svn-id: svn://tug.org/texlive/trunk@32648 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/ChangeLog | 5 +++++ Build/source/texk/dvipdfm-x/dpxfile.c | 19 +++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'Build') 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 + + * dbxfile.c [WIN32]: Include . Avoid use of + uninitialized variables cmdvw and qvw. + 2014-01-12 TANAKA Takuji * 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 #include +#include #else #if HAVE_SYS_WAIT_H #include @@ -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; } -- cgit v1.2.3