Bug #3489: avoid NULL dereference upon failed realloc http://redmine.ruby-lang.org/issues/show/3489 Author: Jim Meyering Status: Open, Priority: Normal ruby -v: ruby 1.9.3dev (2010-06-27 trunk 28450) [x86_64-linux] There are two uses of realloc in thread.c, neither of which handles the case in which realloc returns NULL. Since these functions return void, the only solution appears to be to use xrealloc. That appears to be consistent, since the similar function, rb_fd_set, in the same file already uses xrealloc. I've attached the patch. Sun Jun 27 22:58:36 2010 Jim Meyering <meyering / redhat.com> avoid NULL dereference upon failed realloc * thread.c (rb_fd_resize): Use xrealloc, not realloc. * thread.c (rb_fd_copy): Likewise. ---------------------------------------- http://redmine.ruby-lang.org