diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index f6233e4bf..5c525d574 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -928,6 +928,7 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa, const char *shell; struct ChildRecord *child; char *p = NULL; + char fbuf[MAXPATHLEN]; if (!cmd && !prog) { errno = EFAULT; @@ -975,7 +976,7 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa, dwCreationFlags = (NORMAL_PRIORITY_CLASS); if (prog) { - if (!(p = dln_find_exe(prog, NULL))) { + if (!(p = dln_find_exe_r(prog, NULL, fbuf, sizeof(fbuf)))) { shell = prog; } } |