Module: wine Branch: master Commit: 91aa8a0a8d97512a2b87e9c3689d6cb04926a1b4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=91aa8a0a8d97512a2b87e9c368...
Author: Jason Edmeades us@edmeades.me.uk Date: Thu Mar 8 00:44:46 2007 +0000
cmd.exe: Prevent options to pushd.
---
programs/cmd/builtins.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
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 @@ void WCMD_pushd (char *command) { 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 ) {