projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72784f6
)
Fixed a bug that crashed cmd when "cd /D" but no path. Bug reported by Harteex.
author
Brandon Turner
<turnerb7@msu.edu>
Fri, 2 Sep 2005 22:41:40 +0000
(22:41 +0000)
committer
Brandon Turner
<turnerb7@msu.edu>
Fri, 2 Sep 2005 22:41:40 +0000
(22:41 +0000)
svn path=/trunk/; revision=17611
reactos/subsys/system/cmd/internal.c
patch
|
blob
|
history
diff --git
a/reactos/subsys/system/cmd/internal.c
b/reactos/subsys/system/cmd/internal.c
index
f3c0f69
..
7a2e15a
100644
(file)
--- a/
reactos/subsys/system/cmd/internal.c
+++ b/
reactos/subsys/system/cmd/internal.c
@@
-296,9
+296,16
@@
INT cmd_chdir (LPTSTR cmd, LPTSTR param)
{
bChangeDrive = TRUE;
tmpPath = _tcsstr(param,_T(" "));
+ if(!tmpPath)
+ {
+ /* Didnt find an directories */
+ LoadString(CMD_ModuleHandle, STRING_ERROR_PATH_NOT_FOUND, szMsg, RC_STRING_MAX_SIZE);
+ ConErrPrintf(szMsg);
+ nErrorLevel = 1;
+ return 1;
+ }
tmpPath++;
_tcscpy(szPath,tmpPath);
-
}
else
{