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

Unified Diff: webkit/plugins/ppapi/ppb_url_request_info_impl.cc

Issue 9139076: Added bounds checks to the URLLoader prefetch buffer threshhold. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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
« ppapi/tests/test_url_loader.cc ('K') | « ppapi/tests/test_url_loader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_url_request_info_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
index dcea987c90d25131cf4c8006ea4dc58eb66132d0..eb2ba2778217ece7e3ae73301a1405f9b0b0e6ff 100644
--- a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
@@ -131,6 +131,13 @@ bool PPB_URLRequestInfo_Impl::RequiresUniversalAccess() const {
}
bool PPB_URLRequestInfo_Impl::ValidateData() {
+ if (data().prefetch_buffer_lower_threshold < 0 ||
+ data().prefetch_buffer_upper_threshold < 0 ||
+ data().prefetch_buffer_upper_threshold <=
+ data().prefetch_buffer_lower_threshold) {
+ return false;
+ }
+
// Get the Resource objects for any file refs with only host resource (this
// is the state of the request as it comes off IPC).
for (size_t i = 0; i < data().body.size(); ++i) {
« ppapi/tests/test_url_loader.cc ('K') | « ppapi/tests/test_url_loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698