summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-11-29 10:22:51 -0800
committerGitHub <noreply@github.com>2017-11-29 10:22:51 -0800
commitee572136a5979bdb12d6e603a777db75458d0834 (patch)
tree724e13f14c3f9394b35991b43943754e745a5200
parent4c6803267bf274287b6289f8ccb26beaff517904 (diff)
parent28c4992cab1ebfa7ab6995043261beee04cc4272 (diff)
downloadffi-yajl-ee572136a5979bdb12d6e603a777db75458d0834.tar.gz
Merge pull request #93 from chef/lcg/yajl-ruby-vuln
add check for yajl-ruby vulnerability
-rw-r--r--appveyor.yml1
-rw-r--r--spec/ffi_yajl/parser_spec.rb9
2 files changed, 8 insertions, 2 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 268e8db..acaceed 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -21,7 +21,6 @@ install:
- ruby --version
- gem update --system || gem update --system || gem update --system
- gem --version
- - gem install bundler --quiet --no-ri --no-rdoc || gem install bundler --quiet --no-ri --no-rdoc || gem install bundler --quiet --no-ri --no-rdoc
- bundler --version
build_script:
diff --git a/spec/ffi_yajl/parser_spec.rb b/spec/ffi_yajl/parser_spec.rb
index be392c8..239ae26 100644
--- a/spec/ffi_yajl/parser_spec.rb
+++ b/spec/ffi_yajl/parser_spec.rb
@@ -1,6 +1,6 @@
# encoding: UTF-8
# Copyright (c) 2015 Lamont Granquist
-# Copyright (c) 2015 Chef Software, Inc.
+# Copyright (c) 2015-2017, Chef Software Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -505,6 +505,13 @@ describe "FFI_Yajl::Parser" do
expect { parser }.to raise_error(FFI_Yajl::ParseError)
end
end
+
+ context "should not blow up with bad surrogate trailer" do
+ let(:json) { "{\"e\":{\"\\uD800\\\\DC00\":\"a\"}}" }
+ it "should not explode" do
+ expect { parser }.not_to raise_error
+ end
+ end
end
context "when options are set to empty hash" do