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

Unified Diff: third_party/crashpad/crashpad/util/win/process_info.cc

Issue 2814043003: Update Crashpad to 1f28a123a4c9449e3d7ddad4ff00dacd366d5216 (Closed)
Patch Set: Add missing GN config to fix compile/link. Created 3 years, 8 months 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 | « third_party/crashpad/crashpad/util/util_test.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/crashpad/crashpad/util/win/process_info.cc
diff --git a/third_party/crashpad/crashpad/util/win/process_info.cc b/third_party/crashpad/crashpad/util/win/process_info.cc
index cb2051c0fa03c7681a055fcbfe6e8e2aa7e7eed4..f0e455db7ea110be6b8f2a7cd5821e7b16c81881 100644
--- a/third_party/crashpad/crashpad/util/win/process_info.cc
+++ b/third_party/crashpad/crashpad/util/win/process_info.cc
@@ -157,6 +157,10 @@ std::unique_ptr<uint8_t[]> QueryObject(
if (status == STATUS_INFO_LENGTH_MISMATCH) {
DCHECK_GT(return_length, size);
size = return_length;
+
+ // Free the old buffer before attempting to allocate a new one.
+ buffer.reset();
+
buffer.reset(new uint8_t[size]);
status = crashpad::NtQueryObject(
handle, object_information_class, buffer.get(), size, &return_length);
@@ -167,6 +171,7 @@ std::unique_ptr<uint8_t[]> QueryObject(
return nullptr;
}
+ DCHECK_LE(return_length, size);
DCHECK_GE(return_length, minimum_size);
return buffer;
}
« no previous file with comments | « third_party/crashpad/crashpad/util/util_test.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698