ruby-changes:47683
From: usa <ko1@a...>
Date: Sat, 9 Sep 2017 22:59:03 +0900 (JST)
Subject: [ruby-changes:47683] usa:r59799 (ruby_2_3): * ext/json: bump to version 1.8.3.1. [Backport #13853]
usa 2017-09-09 22:58:58 +0900 (Sat, 09 Sep 2017) New Revision: 59799 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59799 Log: * ext/json: bump to version 1.8.3.1. [Backport #13853] Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/ext/json/generator/generator.c branches/ruby_2_3/ext/json/generator/generator.h branches/ruby_2_3/ext/json/json.gemspec branches/ruby_2_3/ext/json/lib/json/version.rb branches/ruby_2_3/version.h Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 59798) +++ ruby_2_3/version.h (revision 59799) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.5" #define RUBY_RELEASE_DATE "2017-09-09" -#define RUBY_PATCHLEVEL 367 +#define RUBY_PATCHLEVEL 368 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 9 Index: ruby_2_3/ext/json/generator/generator.c =================================================================== --- ruby_2_3/ext/json/generator/generator.c (revision 59798) +++ ruby_2_3/ext/json/generator/generator.c (revision 59799) @@ -301,7 +301,7 @@ static char *fstrndup(const char *ptr, u https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/generator/generator.c#L301 char *result; if (len <= 0) return NULL; result = ALLOC_N(char, len); - memccpy(result, ptr, 0, len); + memcpy(result, ptr, len); return result; } @@ -1055,7 +1055,7 @@ static VALUE cState_indent_set(VALUE sel https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/generator/generator.c#L1055 } } else { if (state->indent) ruby_xfree(state->indent); - state->indent = strdup(RSTRING_PTR(indent)); + state->indent = fstrndup(RSTRING_PTR(indent), len); state->indent_len = len; } return Qnil; @@ -1093,7 +1093,7 @@ static VALUE cState_space_set(VALUE self https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/generator/generator.c#L1093 } } else { if (state->space) ruby_xfree(state->space); - state->space = strdup(RSTRING_PTR(space)); + state->space = fstrndup(RSTRING_PTR(space), len); state->space_len = len; } return Qnil; @@ -1129,7 +1129,7 @@ static VALUE cState_space_before_set(VAL https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/generator/generator.c#L1129 } } else { if (state->space_before) ruby_xfree(state->space_before); - state->space_before = strdup(RSTRING_PTR(space_before)); + state->space_before = fstrndup(RSTRING_PTR(space_before), len); state->space_before_len = len; } return Qnil; @@ -1166,7 +1166,7 @@ static VALUE cState_object_nl_set(VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/generator/generator.c#L1166 } } else { if (state->object_nl) ruby_xfree(state->object_nl); - state->object_nl = strdup(RSTRING_PTR(object_nl)); + state->object_nl = fstrndup(RSTRING_PTR(object_nl), len); state->object_nl_len = len; } return Qnil; @@ -1201,7 +1201,7 @@ static VALUE cState_array_nl_set(VALUE s https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/generator/generator.c#L1201 } } else { if (state->array_nl) ruby_xfree(state->array_nl); - state->array_nl = strdup(RSTRING_PTR(array_nl)); + state->array_nl = fstrndup(RSTRING_PTR(array_nl), len); state->array_nl_len = len; } return Qnil; Index: ruby_2_3/ext/json/generator/generator.h =================================================================== --- ruby_2_3/ext/json/generator/generator.h (revision 59798) +++ ruby_2_3/ext/json/generator/generator.h (revision 59799) @@ -1,7 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/generator/generator.h#L1 #ifndef _GENERATOR_H_ #define _GENERATOR_H_ -#include <string.h> #include <math.h> #include <ctype.h> Index: ruby_2_3/ext/json/lib/json/version.rb =================================================================== --- ruby_2_3/ext/json/lib/json/version.rb (revision 59798) +++ ruby_2_3/ext/json/lib/json/version.rb (revision 59799) @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/lib/json/version.rb#L1 # frozen_string_literal: false module JSON # JSON version - VERSION = '1.8.3' + VERSION = '1.8.3.1' VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc: VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc: VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: Index: ruby_2_3/ext/json/json.gemspec =================================================================== --- ruby_2_3/ext/json/json.gemspec (revision 59798) +++ ruby_2_3/ext/json/json.gemspec (revision 59799) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/json/json.gemspec#L1 Gem::Specification.new do |s| s.name = "json" - s.version = "1.8.3" + s.version = "1.8.3.1" s.summary = "This json is bundled with Ruby" s.executables = [] s.files = ["json.rb", "json/add/bigdecimal.rb", "json/add/complex.rb", "json/add/core.rb", "json/add/date.rb", "json/add/date_time.rb", "json/add/exception.rb", "json/add/ostruct.rb", "json/add/range.rb", "json/add/rational.rb", "json/add/regexp.rb", "json/add/struct.rb", "json/add/symbol.rb", "json/add/time.rb", "json/common.rb", "json/ext.rb", "json/ext/generator.bundle", "json/ext/parser.bundle", "json/generic_object.rb", "json/version.rb"] Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 59798) +++ ruby_2_3/ChangeLog (revision 59799) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Sat Sep 9 22:57:24 2017 SHIBATA Hiroshi <hsbt@r...> + + * ext/json: bump to version 1.8.3.1. [Backport #13853] + Sat Sep 9 22:50:10 2017 NARUSE, Yui <naruse@r...> A HTTP Header value must not contain CR or LF. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/