cmd.exe: Prevent options to pushd.
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 422042e..39cdff7 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -604,6 +604,12 @@
struct env_stack *curdir;
WCHAR *thisdir;
+ if (strchr(command, '/') != NULL) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ WCMD_print_error();
+ return;
+ }
+
curdir = LocalAlloc (LMEM_FIXED, sizeof (struct env_stack));
thisdir = LocalAlloc (LMEM_FIXED, 1024 * sizeof(WCHAR));
if( !curdir || !thisdir ) {