diff options
Diffstat (limited to 'sandbox/src')
-rw-r--r-- | sandbox/src/sandbox_nt_util.cc | 5 | ||||
-rw-r--r-- | sandbox/src/sandbox_nt_util.h | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sandbox/src/sandbox_nt_util.cc b/sandbox/src/sandbox_nt_util.cc index ae5556e..e8a56a7 100644 --- a/sandbox/src/sandbox_nt_util.cc +++ b/sandbox/src/sandbox_nt_util.cc @@ -301,7 +301,6 @@ UNICODE_STRING* GetImageInfoFromModule(HMODULE module, uint32* flags) { if (headers->OptionalHeader.SizeOfCode) *flags |= MODULE_HAS_CODE; } - } while (false); } __except(EXCEPTION_EXECUTE_HANDLER) { } @@ -349,7 +348,7 @@ UNICODE_STRING* ExtractModuleName(const UNICODE_STRING* module_path) { int start_pos = module_path->Length / sizeof(wchar_t) - 1; int ix = start_pos; - for(; ix >= 0; --ix) { + for (; ix >= 0; --ix) { if (module_path->Buffer[ix] == L'\\') { sep = &module_path->Buffer[ix]; break; @@ -361,7 +360,7 @@ UNICODE_STRING* ExtractModuleName(const UNICODE_STRING* module_path) { return NULL; // No path separator found. Use the entire name. - if ((ix == 0) && !sep) { + if (!sep) { sep = &module_path->Buffer[-1]; } diff --git a/sandbox/src/sandbox_nt_util.h b/sandbox/src/sandbox_nt_util.h index f979a0d..87d2409 100644 --- a/sandbox/src/sandbox_nt_util.h +++ b/sandbox/src/sandbox_nt_util.h @@ -118,9 +118,9 @@ UNICODE_STRING* GetImageInfoFromModule(HMODULE module, uint32* flags); UNICODE_STRING* GetBackingFilePath(PVOID address); // Returns the last component of a path that contains the module name. -// It will return NULL if the path is not a full path or if the path ends -// with the path separator. The returned buffer must be freed with a placement -// delete (see GetImageNameFromModule example). +// It will return NULL if the path ends with the path separator. The returned +// buffer must be freed with a placement delete (see GetImageNameFromModule +// example). UNICODE_STRING* ExtractModuleName(const UNICODE_STRING* module_path); // Returns true if the parameters correspond to a dll mapped as code. |