Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: sandbox/win/src/sandbox_nt_util.cc

Issue 1485853003: Revert of Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/sandbox_nt_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sandbox_nt_util.cc
diff --git a/sandbox/win/src/sandbox_nt_util.cc b/sandbox/win/src/sandbox_nt_util.cc
index 82de75cae822f89598d4b7ab3d50b7c4d660a97f..2b2a3bae0f7c85838f88d847b7cb7a3717605bdf 100644
--- a/sandbox/win/src/sandbox_nt_util.cc
+++ b/sandbox/win/src/sandbox_nt_util.cc
@@ -290,8 +290,7 @@
// Hacky code... replace with AllocAndCopyObjectAttributes.
NTSTATUS AllocAndCopyName(const OBJECT_ATTRIBUTES* in_object,
- wchar_t** out_name,
- uint32_t* attributes,
+ wchar_t** out_name, uint32* attributes,
HANDLE* root) {
if (!InitHeap())
return STATUS_NO_MEMORY;
@@ -434,7 +433,7 @@
return out_string;
}
-UNICODE_STRING* GetImageInfoFromModule(HMODULE module, uint32_t* flags) {
+UNICODE_STRING* GetImageInfoFromModule(HMODULE module, uint32* flags) {
// PEImage's dtor won't be run during SEH unwinding, but that's OK.
#pragma warning(push)
#pragma warning(disable: 4509)
@@ -530,7 +529,7 @@
// Based on the code above, size_bytes should always be small enough
// to make the static_cast below safe.
- DCHECK_NT(UINT16_MAX > size_bytes);
+ DCHECK_NT(kuint16max > size_bytes);
char* str_buffer = new(NT_ALLOC) char[size_bytes + sizeof(UNICODE_STRING)];
if (!str_buffer)
return NULL;
@@ -586,9 +585,8 @@
return ret;
}
-bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info,
- DWORD length,
- uint32_t file_info_class) {
+bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length,
+ uint32 file_info_class) {
if (FileRenameInformation != file_info_class)
return false;
@@ -608,7 +606,7 @@
// Check if it starts with \\??\\. We don't support relative paths.
if (file_info->FileNameLength < sizeof(kPathPrefix) ||
- file_info->FileNameLength > UINT16_MAX)
+ file_info->FileNameLength > kuint16max)
return false;
if (file_info->FileName[0] != kPathPrefix[0] ||
« no previous file with comments | « sandbox/win/src/sandbox_nt_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698