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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5bc2925a93dc04b2a235f77d74f096f4a4a0009
4
- data.tar.gz: 628187cc4a5a4e052c838238f4d75855081c479f
3
+ metadata.gz: 96b69dbb79f06c9b9167f6a46db45696ceffcba0
4
+ data.tar.gz: 2d1114946f2aead4371317dac549a662698f66a8
5
5
  SHA512:
6
- metadata.gz: 6163d74a5af3325dc376be2c5a5da4d4033f953e6c69436178d7ab572d9c8cc6781aa6b47507dec7c49703904f7e609c0e593f87bf69ba08329f47e7bd73c72d
7
- data.tar.gz: 41095aace4a63e252c7d223332dd759b512c5343a6c76ab3c6365a319cde111559b614909e4fb92efa69523bbcb1d208d7316c875a757cb5e4e2a1bee6afa4d6
6
+ metadata.gz: be6ae35da914550194edccd71507555b97973592dbb7155f34182d08fcac4a75450eda8cabb083c67d4e6daaee6ba3c0198da6fc3aa854ed54098bc5514a3ff4
7
+ data.tar.gz: 49a24d166c2adc2aa938bd3c91b3440e02e7bfaa6f9e30cd0c745c17afc6be906721391241f08d6612d3a3044d3bc4b5b1105bddfe42547430a39c2e74829814
@@ -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
- if (str[end] == '\\' && str[end + 1] == 'u') {
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
@@ -1,3 +1,3 @@
1
1
  module Yajl
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.3'
3
3
  end
@@ -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.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-04-05 00:00:00.000000000 Z
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.8
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.