ruby-changes:56891
From: nagachika <ko1@a...>
Date: Fri, 9 Aug 2019 22:42:42 +0900 (JST)
Subject: [ruby-changes:56891] nagachika: ec1666eb20 (ruby_2_6): merge revision(s) 8f51da5d41f0642d5a971e4223d1ba14643c6398: [Backport #15946]
https://git.ruby-lang.org/ruby.git/commit/?id=ec1666eb20 From ec1666eb20e2fee6e96c9d05ccf69e2d13f0ca92 Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Fri, 9 Aug 2019 13:42:26 +0000 Subject: merge revision(s) 8f51da5d41f0642d5a971e4223d1ba14643c6398: [Backport #15946] Get rid of undefined behavior * string.c (rb_str_sub_bang): str and repl can be same. [Bug #15946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e diff --git a/string.c b/string.c index c38741f..f7e9c3d 100644 --- a/string.c +++ b/string.c @@ -5087,7 +5087,7 @@ rb_str_sub_bang(int argc, VALUE *argv, VALUE str) https://github.com/ruby/ruby/blob/trunk/string.c#L5087 if (rlen != plen) { memmove(p + beg0 + rlen, p + beg0 + plen, len - beg0 - plen); } - memcpy(p + beg0, rp, rlen); + memmove(p + beg0, rp, rlen); len += rlen - plen; STR_SET_LEN(str, len); TERM_FILL(&RSTRING_PTR(str)[len], TERM_LEN(str)); diff --git a/version.h b/version.h index 67f60ed..4059e38 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L1 #define RUBY_VERSION "2.6.3" #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 89 +#define RUBY_PATCHLEVEL 90 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 8 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/