1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* struct.c (rb_struct_s_members): check if __members__ is an

array to prevent segmentation fault.  [ruby-dev:31759]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-09-08 01:08:23 +00:00
parent 86ca9a6930
commit 2677f72e2e
2 changed files with 11 additions and 0 deletions

View file

@ -1,8 +1,16 @@
<<<<<<< current
Sat Sep 8 09:33:09 2007 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date/format.rb (str[fp]time): now check specifications more
strictly.
=======
Sat Sep 8 10:05:14 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* struct.c (rb_struct_s_members): check if __members__ is an
array to prevent segmentation fault. [ruby-dev:31759]
>>>>>>> patched
Sat Sep 8 02:56:31 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* test/ruby/test_fiber.rb (TestFiber::test_throw): uncaught throw

View file

@ -39,6 +39,9 @@ rb_struct_s_members(VALUE klass)
if (NIL_P(members)) {
rb_raise(rb_eTypeError, "uninitialized struct");
}
if (TYPE(members) != T_ARRAY) {
rb_raise(rb_eTypeError, "corrupted struct");
}
return members;
}