Ver código fonte

Check for bounds check error

gingerBill 1 ano atrás
pai
commit
68b70a2183
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      src/cached.cpp

+ 3 - 0
src/cached.cpp

@@ -259,6 +259,9 @@ bool try_cached_build(Checker *c) {
 			timestamp_str = string_trim_whitespace(timestamp_str);
 			path_str = string_trim_whitespace(path_str);
 
+			if (file_count >= files.count) {
+				goto do_write_file;
+			}
 			if (files[file_count] != path_str) {
 				goto do_write_file;
 			}