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

Unified Diff: snapshot/win/process_snapshot_win.cc

Issue 1412243005: win: Validate readability of memory ranges added to minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 2 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 | « snapshot/win/end_to_end_test.py ('k') | snapshot/win/thread_snapshot_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/win/process_snapshot_win.cc
diff --git a/snapshot/win/process_snapshot_win.cc b/snapshot/win/process_snapshot_win.cc
index e5ee48a8d7397896f886eee4d4b1e051dfff4cd1..bc3b7b1ac1665e2423f9642da37e03dfa2b178f4 100644
--- a/snapshot/win/process_snapshot_win.cc
+++ b/snapshot/win/process_snapshot_win.cc
@@ -344,19 +344,8 @@ void ProcessSnapshotWin::AddMemorySnapshot(
if (size == 0)
return;
- // Ensure that the entire range is readable. TODO(scottmg): Consider
- // generalizing this as part of
- // https://code.google.com/p/crashpad/issues/detail?id=59.
- auto ranges = process_reader_.GetProcessInfo().GetReadableRanges(
- CheckedRange<WinVMAddress, WinVMSize>(address, size));
- if (ranges.size() != 1) {
- LOG(ERROR) << base::StringPrintf(
- "range at 0x%llx, size 0x%llx fully unreadable", address, size);
- return;
- }
- if (ranges[0].base() != address || ranges[0].size() != size) {
- LOG(ERROR) << base::StringPrintf(
- "some of range at 0x%llx, size 0x%llx unreadable", address, size);
+ if (!process_reader_.GetProcessInfo().LoggingRangeIsFullyReadable(
+ CheckedRange<WinVMAddress, WinVMSize>(address, size))) {
return;
}
« no previous file with comments | « snapshot/win/end_to_end_test.py ('k') | snapshot/win/thread_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698