summaryrefslogtreecommitdiffstats
path: root/src/deps_log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/deps_log.cc')
-rw-r--r--src/deps_log.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc
index 89c6023..8734dd7 100644
--- a/src/deps_log.cc
+++ b/src/deps_log.cc
@@ -209,7 +209,7 @@ bool DepsLog::Load(const string& path, State* state, string* err) {
bool is_deps = (size >> 31) != 0;
size = size & 0x7FFFFFFF;
- if (fread(buf, size, 1, f) < 1 || size > kMaxRecordSize) {
+ if (size > kMaxRecordSize || fread(buf, size, 1, f) < 1) {
read_failed = true;
break;
}