Commit b9305cab authored by groby@chromium.org's avatar groby@chromium.org

[Coverity] Fix signed/unsigned issue.

NtQueryObject returns, and NT_SUCCESS expects, NTSTATUS (a LONG variable). NT_SUCCESS checks for >=0, so CHECK statements as they are will never fire.

CID=104038
BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/10407084

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138286 0039d316-1c4b-4281-b951-d872f2087c98
parent fca6b9ba
......@@ -489,7 +489,7 @@ void CheckDuplicateHandle(HANDLE handle) {
OBJECT_TYPE_INFORMATION* type_info =
reinterpret_cast<OBJECT_TYPE_INFORMATION*>(buffer);
ULONG size = sizeof(buffer) - sizeof(wchar_t);
DWORD error;
NTSTATUS error;
error = g_QueryObject(handle, ObjectTypeInformation, type_info, size, &size);
CHECK(NT_SUCCESS(error));
type_info->Name.Buffer[type_info->Name.Length / sizeof(wchar_t)] = L'\0';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment