Skip to content

Commit e6a782e

Browse files
committed
merge revision(s) r45453,r45455,r45577: [Backport ruby#9798]
* ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to libyaml-0.1.6 for CVE-2014-2525. * ext/psych/yaml/config.h: ditto. * ext/psych/yaml/scanner.c: ditto. * ext/psych/yaml/yaml_private.h: ditto. * ext/psych/psych.gemspec: update gemspec for psych-2.0.5 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent f55b93f commit e6a782e

File tree

7 files changed

+30
-13
lines changed

7 files changed

+30
-13
lines changed

ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
Mon May 5 00:42:35 2014 SHIBATA Hiroshi <[email protected]>
2+
3+
* ext/psych/psych.gemspec: update gemspec for psych-2.0.5
4+
5+
Mon May 5 00:42:35 2014 SHIBATA Hiroshi <[email protected]>
6+
7+
* ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to
8+
libyaml-0.1.6 for CVE-2014-2525.
9+
* ext/psych/yaml/config.h: ditto.
10+
* ext/psych/yaml/scanner.c: ditto.
11+
* ext/psych/yaml/yaml_private.h: ditto.
12+
113
Mon May 5 00:35:20 2014 Aaron Patterson <[email protected]>
214

315
* ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding

ext/psych/lib/psych.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#
2222
# Psych is a YAML parser and emitter.
2323
# Psych leverages libyaml [Home page: http://pyyaml.org/wiki/LibYAML]
24-
# or [Git repo: https://github.com/zerotao/libyaml] for its YAML parsing
24+
# or [HG repo: https://bitbucket.org/xi/libyaml] for its YAML parsing
2525
# and emitting capabilities. In addition to wrapping libyaml, Psych also
2626
# knows how to serialize and de-serialize most Ruby objects to and from
2727
# the YAML format.
@@ -217,7 +217,7 @@
217217

218218
module Psych
219219
# The version is Psych you're using
220-
VERSION = '2.0.4'
220+
VERSION = '2.0.5'
221221

222222
# The version of libyaml Psych is using
223223
LIBYAML_VERSION = Psych.libyaml_version.join '.'

ext/psych/psych.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
Gem::Specification.new do |s|
44
s.name = "psych"
5-
s.version = "2.0.3"
5+
s.version = "2.0.5"
66

77
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
88
s.require_paths = ["lib"]
99
s.authors = ["Aaron Patterson"]
10-
s.date = "2014-02-04"
10+
s.date = "2014-03-27"
1111
s.description = "Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]\nfor its YAML parsing and emitting capabilities. In addition to wrapping\nlibyaml, Psych also knows how to serialize and de-serialize most Ruby objects\nto and from the YAML format."
1212
s.email = ["[email protected]"]
1313
s.extensions = ["ext/psych/extconf.rb"]
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
1717
s.rdoc_options = ["--main", "README.rdoc"]
1818
s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
1919
s.rubyforge_project = "psych"
20-
s.rubygems_version = "2.2.1"
20+
s.rubygems_version = "2.2.2"
2121
s.summary = "Psych is a YAML parser and emitter"
2222
s.test_files = ["test/psych/handlers/test_recorder.rb", "test/psych/json/test_stream.rb", "test/psych/nodes/test_enumerable.rb", "test/psych/test_alias_and_anchor.rb", "test/psych/test_array.rb", "test/psych/test_boolean.rb", "test/psych/test_class.rb", "test/psych/test_coder.rb", "test/psych/test_date_time.rb", "test/psych/test_deprecated.rb", "test/psych/test_document.rb", "test/psych/test_emitter.rb", "test/psych/test_encoding.rb", "test/psych/test_engine_manager.rb", "test/psych/test_exception.rb", "test/psych/test_hash.rb", "test/psych/test_json_tree.rb", "test/psych/test_merge_keys.rb", "test/psych/test_nil.rb", "test/psych/test_null.rb", "test/psych/test_numeric.rb", "test/psych/test_object.rb", "test/psych/test_object_references.rb", "test/psych/test_omap.rb", "test/psych/test_parser.rb", "test/psych/test_psych.rb", "test/psych/test_safe_load.rb", "test/psych/test_scalar.rb", "test/psych/test_scalar_scanner.rb", "test/psych/test_serialize_subclasses.rb", "test/psych/test_set.rb", "test/psych/test_stream.rb", "test/psych/test_string.rb", "test/psych/test_struct.rb", "test/psych/test_symbol.rb", "test/psych/test_tainted.rb", "test/psych/test_to_yaml_properties.rb", "test/psych/test_tree_builder.rb", "test/psych/test_yaml.rb", "test/psych/test_yamldbm.rb", "test/psych/test_yamlstore.rb", "test/psych/visitors/test_depth_first.rb", "test/psych/visitors/test_emitter.rb", "test/psych/visitors/test_to_ruby.rb", "test/psych/visitors/test_yaml_tree.rb"]
2323
end

ext/psych/yaml/config.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
21
#define PACKAGE_NAME "yaml"
32
#define PACKAGE_TARNAME "yaml"
4-
#define PACKAGE_VERSION "0.1.5"
5-
#define PACKAGE_STRING "yaml 0.1.5"
3+
#define PACKAGE_VERSION "0.1.6"
4+
#define PACKAGE_STRING "yaml 0.1.6"
65
#define PACKAGE_BUGREPORT "http://pyyaml.org/newticket?component libyaml"
76
#define PACKAGE_URL ""
87
#define YAML_VERSION_MAJOR 0
98
#define YAML_VERSION_MINOR 1
10-
#define YAML_VERSION_PATCH 5
11-
#define YAML_VERSION_STRING "0.1.5"
9+
#define YAML_VERSION_PATCH 6
10+
#define YAML_VERSION_STRING "0.1.6"

ext/psych/yaml/scanner.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,6 +2629,9 @@ yaml_parser_scan_tag_uri(yaml_parser_t *parser, int directive,
26292629
/* Check if it is a URI-escape sequence. */
26302630

26312631
if (CHECK(parser->buffer, '%')) {
2632+
if (!STRING_EXTEND(parser, string))
2633+
goto error;
2634+
26322635
if (!yaml_parser_scan_uri_escapes(parser,
26332636
directive, start_mark, &string)) goto error;
26342637
}

ext/psych/yaml/yaml_private.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,12 @@ yaml_string_join(
146146
(string).start = (string).pointer = (string).end = 0)
147147

148148
#define STRING_EXTEND(context,string) \
149-
(((string).pointer+5 < (string).end) \
149+
((((string).pointer+5 < (string).end) \
150150
|| yaml_string_extend(&(string).start, \
151-
&(string).pointer, &(string).end))
151+
&(string).pointer, &(string).end)) ? \
152+
1 : \
153+
((context)->error = YAML_MEMORY_ERROR, \
154+
0))
152155

153156
#define CLEAR(context,string) \
154157
((string).pointer = (string).start, \

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.1.2"
22
#define RUBY_RELEASE_DATE "2014-05-05"
3-
#define RUBY_PATCHLEVEL 85
3+
#define RUBY_PATCHLEVEL 86
44

55
#define RUBY_RELEASE_YEAR 2014
66
#define RUBY_RELEASE_MONTH 5

0 commit comments

Comments
 (0)