Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 427614f

Browse files
committedAug 28, 2013
document an assumption
1 parent 9940196 commit 427614f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/deps_log.cc

+1
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ bool DepsLog::Load(const string& path, State* state, string* err) {
234234
++unique_dep_record_count;
235235
} else {
236236
int path_size = size - 4;
237+
assert(path_size > 0); // CanonicalizePath() rejects empty paths.
237238
// There can be up to 3 bytes of padding.
238239
if (buf[path_size - 1] == '\0') --path_size;
239240
if (buf[path_size - 1] == '\0') --path_size;

0 commit comments

Comments
 (0)
This repository has been archived.