diff options
Diffstat (limited to 'src/deps_log.cc')
-rw-r--r-- | src/deps_log.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc index a5d726c..64ef58f 100644 --- a/src/deps_log.cc +++ b/src/deps_log.cc @@ -234,6 +234,7 @@ bool DepsLog::Load(const string& path, State* state, string* err) { ++unique_dep_record_count; } else { int path_size = size - 4; + assert(path_size > 0); // CanonicalizePath() rejects empty paths. // There can be up to 3 bytes of padding. if (buf[path_size - 1] == '\0') --path_size; if (buf[path_size - 1] == '\0') --path_size; |