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

Unified Diff: net/disk_cache/simple/simple_test_util.h

Issue 2086053003: Simple Cache: validate lengths before allocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: net/disk_cache/simple/simple_test_util.h
diff --git a/net/disk_cache/simple/simple_test_util.h b/net/disk_cache/simple/simple_test_util.h
index cef6b47c8680866e35c0b3507fe6ee2e03d96175..fa119cdffef5cf274d5770d9e80c04d01ed5fda3 100644
--- a/net/disk_cache/simple/simple_test_util.h
+++ b/net/disk_cache/simple/simple_test_util.h
@@ -51,6 +51,10 @@ bool RemoveKeySHA256FromEntry(const std::string& key,
bool CorruptKeySHA256FromEntry(const std::string& key,
const base::FilePath& cache_path);
+// Modifies the stream 0 length field from an entry so it is invalid.
+bool CorruptStream0LengthFromEntry(const std::string& key,
+ const base::FilePath& cache_path);
+
} // namespace simple_backend
} // namespace disk_cache

Powered by Google App Engine
This is Rietveld 408576698