diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-11 22:50:34 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-11 22:50:34 +0000 |
commit | 16bd095b0c37ce3cccbc89494c4d71e70685f640 (patch) | |
tree | 122f902c6942faff857a260d6a53b35d9bebe025 /sandbox | |
parent | ea881d9bd481e3c3b261680cf815ca09ff07cbc1 (diff) | |
download | chromium_src-16bd095b0c37ce3cccbc89494c4d71e70685f640.zip chromium_src-16bd095b0c37ce3cccbc89494c4d71e70685f640.tar.gz chromium_src-16bd095b0c37ce3cccbc89494c4d71e70685f640.tar.bz2 |
Handle STATUS_BUFFER_OVERFLOW return value from NtQueryObject().
BUG=91386
TEST=None
Review URL: http://codereview.chromium.org/7542026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96478 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/src/handle_closer.cc | 3 | ||||
-rw-r--r-- | sandbox/src/handle_closer_agent.cc | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sandbox/src/handle_closer.cc b/sandbox/src/handle_closer.cc index a9778eb..d79f2c1 100644 --- a/sandbox/src/handle_closer.cc +++ b/sandbox/src/handle_closer.cc @@ -187,7 +187,8 @@ bool GetHandleName(HANDLE handle, string16* handle_name) { name.reset(reinterpret_cast<UNICODE_STRING*>(new BYTE[size])); result = QueryObject(handle, ObjectNameInformation, name.get(), size, &size); - } while (result == STATUS_INFO_LENGTH_MISMATCH); + } while (result == STATUS_INFO_LENGTH_MISMATCH || + result == STATUS_BUFFER_OVERFLOW); if (NT_SUCCESS(result) && name->Buffer && name->Length) handle_name->assign(name->Buffer, name->Length / sizeof(wchar_t)); diff --git a/sandbox/src/handle_closer_agent.cc b/sandbox/src/handle_closer_agent.cc index b640c08..38c174e1 100644 --- a/sandbox/src/handle_closer_agent.cc +++ b/sandbox/src/handle_closer_agent.cc @@ -82,7 +82,8 @@ bool HandleCloserAgent::CloseHandles() { // Get the type name, reusing the buffer. ULONG size = static_cast<ULONG>(type_info_buffer.size()); rc = QueryObject(handle, ObjectTypeInformation, type_info, size, &size); - while (rc == STATUS_INFO_LENGTH_MISMATCH) { + while (rc == STATUS_INFO_LENGTH_MISMATCH || + rc == STATUS_BUFFER_OVERFLOW) { type_info_buffer.resize(size + sizeof(wchar_t)); type_info = reinterpret_cast<OBJECT_TYPE_INFORMATION*>( &(type_info_buffer[0])); |