From e51b9b0c039b2fe238316a1b8db2e512cea7d7b2 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Thu, 31 Oct 2013 10:19:55 +0100 Subject: [PATCH] winpr-thread: fixed issue with commands starting with / --- winpr/libwinpr/thread/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winpr/libwinpr/thread/process.c b/winpr/libwinpr/thread/process.c index e88c3e3..514d115 100644 --- a/winpr/libwinpr/thread/process.c +++ b/winpr/libwinpr/thread/process.c @@ -140,7 +140,7 @@ char* FindApplicationPath(char* application) return NULL; if (application[0] == '/') - return application; + return strdup(application); nSize = GetEnvironmentVariableA("PATH", NULL, 0); @@ -183,7 +183,7 @@ BOOL _CreateProcessExA(HANDLE hToken, DWORD dwLogonFlags, int numArgs; LPSTR* pArgs; char** envp; - char* filename; + char* filename = NULL; WINPR_THREAD* thread; WINPR_PROCESS* process; WINPR_ACCESS_TOKEN* token; -- 2.7.4