summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-27 10:35:50 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-27 10:35:50 +0000
commit3aed194ac3edba9249b34fce09de36fa76326cbc (patch)
treef7ba374831da8ba8ef8116a69aaefb878b14c550 /ChangeLog
parent244885b6378b3d059e7f2dcfb4787ba3bbc30a86 (diff)
merge revision(s) 56938: [Backport #12988]
Stop reading past the end of `ivptr` array If you have code like this: ```ruby class A def initialize @a = nil @b = nil @c = nil @d = nil @e = nil end end x = A.new y = x.clone 100.times { |z| x.instance_variable_set(:"@foo#{z}", nil) } puts y.inspect ``` `x` and `y` will share `iv_index_tbl` hashes. However, the size of the hash will grow larger than the number if entries in `ivptr` in `y`. Before this commit, `rb_ivar_count` would use the size of the hash to determine how far to read in to the array, but this means that it could read past the end of the array and cause the program to segv [ruby-core:78403] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index feb588e0bd..960e8cd7d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Dec 27 19:34:47 2016 Aaron Patterson <tenderlove@ruby-lang.org>
+
+ * variable.c (rb_ivar_count): stop reading past the end of ivptr array.
+ [Bug #12988]
+
Tue Dec 27 19:32:03 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread.c (rb_thread_s_abort_exc, rb_thread_s_abort_exc_set):