yajl-ruby 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of yajl-ruby might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/yajl/yajl_encode.c +2 -2
- data/lib/yajl/version.rb +1 -1
- data/spec/parsing/one_off_spec.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96b69dbb79f06c9b9167f6a46db45696ceffcba0
|
4
|
+
data.tar.gz: 2d1114946f2aead4371317dac549a662698f66a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be6ae35da914550194edccd71507555b97973592dbb7155f34182d08fcac4a75450eda8cabb083c67d4e6daaee6ba3c0198da6fc3aa854ed54098bc5514a3ff4
|
7
|
+
data.tar.gz: 49a24d166c2adc2aa938bd3c91b3440e02e7bfaa6f9e30cd0c745c17afc6be906721391241f08d6612d3a3044d3bc4b5b1105bddfe42547430a39c2e74829814
|
data/ext/yajl/yajl_encode.c
CHANGED
@@ -162,8 +162,8 @@ void yajl_string_decode(yajl_buf buf, const unsigned char * str,
|
|
162
162
|
end+=3;
|
163
163
|
/* check if this is a surrogate */
|
164
164
|
if ((codepoint & 0xFC00) == 0xD800) {
|
165
|
-
end
|
166
|
-
|
165
|
+
if (end + 2 < len && str[end + 1] == '\\' && str[end + 2] == 'u') {
|
166
|
+
end++;
|
167
167
|
unsigned int surrogate = 0;
|
168
168
|
hexToDigit(&surrogate, str + end + 2);
|
169
169
|
codepoint =
|
data/lib/yajl/version.rb
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
|
3
3
|
|
4
4
|
describe "One-off JSON examples" do
|
5
|
+
it "should not blow up with a bad surrogate trailer" do
|
6
|
+
# https://github.com/brianmario/yajl-ruby/issues/176
|
7
|
+
bad_json = "{\"e\":{\"\\uD800\\\\DC00\":\"a\"}}"
|
8
|
+
|
9
|
+
Yajl::Parser.new.parse(bad_json)
|
10
|
+
end
|
11
|
+
|
5
12
|
it "should parse 23456789012E666 and return Infinity" do
|
6
13
|
infinity = (1.0/0)
|
7
14
|
silence_warnings do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yajl-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Lopez
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-11-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
version: '0'
|
246
246
|
requirements: []
|
247
247
|
rubyforge_project:
|
248
|
-
rubygems_version: 2.6.
|
248
|
+
rubygems_version: 2.6.11
|
249
249
|
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: Ruby C bindings to the excellent Yajl JSON stream-based parser library.
|