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

Unified Diff: ipc/ipc_message_utils.cc

Issue 2570113002: Increase the depth limit of JSONParser and IPC serialization from 100 to 200. (Closed)
Patch Set: added comment Created 3 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
« no previous file with comments | « components/safe_json/json_sanitizer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 1e0cad500963091b62e1c6c8063f4642d69b4b1c..fb45218bff3da682a4af16a16b0a62d5ac4c637a 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -43,7 +43,7 @@ namespace IPC {
namespace {
-const int kMaxRecursionDepth = 100;
+const int kMaxRecursionDepth = 200;
template<typename CharType>
void LogBytes(const std::vector<CharType>& data, std::string* out) {
@@ -78,7 +78,7 @@ void GetValueSize(base::PickleSizer* sizer,
const base::Value* value,
int recursion) {
if (recursion > kMaxRecursionDepth) {
- LOG(WARNING) << "Max recursion depth hit in GetValueSize.";
+ LOG(ERROR) << "Max recursion depth hit in GetValueSize.";
return;
}
@@ -142,7 +142,7 @@ void GetValueSize(base::PickleSizer* sizer,
void WriteValue(base::Pickle* m, const base::Value* value, int recursion) {
bool result;
if (recursion > kMaxRecursionDepth) {
- LOG(WARNING) << "Max recursion depth hit in WriteValue.";
+ LOG(ERROR) << "Max recursion depth hit in WriteValue.";
return;
}
@@ -256,7 +256,7 @@ bool ReadValue(const base::Pickle* m,
base::Value** value,
int recursion) {
if (recursion > kMaxRecursionDepth) {
- LOG(WARNING) << "Max recursion depth hit in ReadValue.";
+ LOG(ERROR) << "Max recursion depth hit in ReadValue.";
return false;
}
« no previous file with comments | « components/safe_json/json_sanitizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698