40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
From 36e9ed7fef6eb2d14becf6c52452e4ab16e4bf01 Mon Sep 17 00:00:00 2001
|
|
From: nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
|
|
Date: Fri, 20 Mar 2020 08:12:05 +0000
|
|
Subject: [PATCH] backport 80b5a0ff2a7709367178f29d4ebe1c54122b1c27 partially
|
|
as a securify fix for CVE-2020-10663. The patch was provided by Jeremy Evans.
|
|
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
---
|
|
ext/json/parser/parser.c | 2 +-
|
|
ext/json/parser/parser.rl | 2 +-
|
|
version.h | 2 +-
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
|
|
index b02aae8fb980..027fbcc26f9d 100644
|
|
--- a/ext/json/parser/parser.c
|
|
+++ b/ext/json/parser/parser.c
|
|
@@ -1835,7 +1835,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
|
|
} else {
|
|
json->max_nesting = 100;
|
|
json->allow_nan = 0;
|
|
- json->create_additions = 1;
|
|
+ json->create_additions = 0;
|
|
json->create_id = rb_funcall(mJSON, i_create_id, 0);
|
|
json->object_class = Qnil;
|
|
json->array_class = Qnil;
|
|
diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
|
|
index d4e7a60e9d1e..fb0bb515decb 100644
|
|
--- a/ext/json/parser/parser.rl
|
|
+++ b/ext/json/parser/parser.rl
|
|
@@ -730,7 +730,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
|
|
} else {
|
|
json->max_nesting = 100;
|
|
json->allow_nan = 0;
|
|
- json->create_additions = 1;
|
|
+ json->create_additions = 0;
|
|
json->create_id = rb_funcall(mJSON, i_create_id, 0);
|
|
json->object_class = Qnil;
|
|
json->array_class = Qnil;
|
|
|