Opened 2 years ago
Last modified 2 years ago
proc_open() fails if SHELL is not set in the environment. The attached patch creates a fallback to /bin/sh (Unix) or C:\WINNT\system32\cmd.exe (Windows) instead.
Adds fallback to proc_open() if SHELL is not in env
Better to fallback to %WINDIR%\system32\cmd.exe instead of a hardcoded path. Attaching a new patch. Thanks for the tip Robe. The patch is only tested on Unix since I don't have a Windows machine. Make sure to test before applying.
Best regards, Aron
Better to use %WINDIR%\system32\cmd.exe than to hardcode the path
"strcat(shell.." is, however buffer overflow, in the proc_open.c.2.diff patch, i'll write one myself.
Oops, clumsy me. Anyway you get what I mean ;)
fixed in [1060]