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

Unified Diff: third_party/crashpad/crashpad/util/file/file_reader.cc

Issue 2754553002: Update Crashpad to 18d70acf81df49cc10b00bcc67c1ec64e16bd9d0 (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/crashpad/crashpad/util/file/file_reader.cc
diff --git a/third_party/crashpad/crashpad/util/file/file_reader.cc b/third_party/crashpad/crashpad/util/file/file_reader.cc
index 14d06c74b05671c9817481bdaead971fa14405e2..4f5ae773257cfaaa619f119ac3f0121733f0adf6 100644
--- a/third_party/crashpad/crashpad/util/file/file_reader.cc
+++ b/third_party/crashpad/crashpad/util/file/file_reader.cc
@@ -109,10 +109,14 @@ FileOperationResult WeakStdioFileReader::Read(void* data, size_t size) {
DCHECK(file_);
size_t rv = fread(data, 1, size, file_);
- if (rv < size && ferror(file_)) {
+ if (rv != size && ferror(file_)) {
STDIO_PLOG(ERROR) << "fread";
return -1;
}
+ if (rv > size) {
+ LOG(ERROR) << "fread: expected " << size << ", observed " << rv;
+ return -1;
+ }
return rv;
}
« no previous file with comments | « third_party/crashpad/crashpad/tools/tools.gyp ('k') | third_party/crashpad/crashpad/util/file/file_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698