Commit 4e91fa5f authored by Thomas Faller's avatar Thomas Faller Committed by Alexandre Julliard

cmd: Fix invalid memory access.

parent cfe52abc
......@@ -1330,7 +1330,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
* Changing default drive has to be handled as a special case.
*/
if ((cmd[1] == ':') && IsCharAlphaW(cmd[0]) && (strlenW(cmd) == 2)) {
if ((strlenW(cmd) == 2) && (cmd[1] == ':') && IsCharAlphaW(cmd[0])) {
WCHAR envvar[5];
WCHAR dir[MAX_PATH];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment