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

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

Issue 2205073002: Simple Cache: validate lengths before allocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 4 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
« no previous file with comments | « net/disk_cache/simple/simple_synchronous_entry.cc ('k') | net/disk_cache/simple/simple_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/disk_cache/simple/simple_synchronous_entry.cc ('k') | net/disk_cache/simple/simple_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698