diff options
Diffstat (limited to 'net/http/http_auth_cache.h')
-rw-r--r-- | net/http/http_auth_cache.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h index ab43f9b..62c09e9 100644 --- a/net/http/http_auth_cache.h +++ b/net/http/http_auth_cache.h @@ -74,6 +74,13 @@ class HttpAuthCache { const std::wstring& username, const std::wstring& password); + // Prevent unbounded memory growth. These are safeguards for abuse; it is + // not expected that the limits will be reached in ordinary usage. + // This also defines the worst-case lookup times (which grow linearly + // with number of elements in the cache). + enum { kMaxNumPathsPerRealmEntry = 10 }; + enum { kMaxNumRealmEntries = 10 }; + private: typedef std::list<Entry> EntryList; EntryList entries_; |