projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
745952e
)
Fix AV in corerun on invalid filename
author
Jan Kotas
<jkotas@microsoft.com>
Wed, 13 Sep 2017 03:32:08 +0000
(20:32 -0700)
committer
Jan Kotas
<jkotas@microsoft.com>
Wed, 13 Sep 2017 17:08:32 +0000
(10:08 -0700)
Before this fix, corerun would AV on certain invalid paths e.g.: corerun test.exe\
src/coreclr/hosts/corerun/corerun.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/hosts/corerun/corerun.cpp
b/src/coreclr/hosts/corerun/corerun.cpp
index
a9e3b66
..
814aac9
100644
(file)
--- a/
src/coreclr/hosts/corerun/corerun.cpp
+++ b/
src/coreclr/hosts/corerun/corerun.cpp
@@
-402,7
+402,7
@@
bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo
appPathPtr = appPath.OpenUnicodeBuffer(size - 1);
length = WszGetFullPathName(exeName, size, appPathPtr, &filePart);
}
- if (length == 0 || length >= size) {
+ if (length == 0 || length >= size
|| filePart == NULL
) {
log << W("Failed to get full path: ") << exeName << Logger::endl;
log << W("Error code: ") << GetLastError() << Logger::endl;
return false;