From 230a418822b25b3f5bfe19fbb36fcc32bfc93c48 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 5 Nov 2005 13:50:24 +0000 Subject: [PATCH] proper clean-up in case of bad input git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4371 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/nsExec/nsexec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Contrib/nsExec/nsexec.c b/Contrib/nsExec/nsexec.c index ebd11fdf..b7df55d0 100644 --- a/Contrib/nsExec/nsexec.c +++ b/Contrib/nsExec/nsexec.c @@ -165,8 +165,11 @@ params: if (!pExec[0]) { - lstrcpy(szRet, "error"); - goto done; + pushstring("error"); + *(pExec-2) = '\0'; // skip space and quote + DeleteFile(executor); + GlobalFree(g_exec); + return; } {