From: Nobuyoshi Nakada Date: 2010-06-29T20:44:46+09:00 Subject: [ruby-core:30955] Re: st.c: avoid 2 of 3 NULL-dereference bugs in sym-tab initialization Hi, At Tue, 29 Jun 2010 17:58:19 +0900, Jim Meyering wrote in [ruby-core:30953]: > Here is a patch to fix two NULL-dereference problems in st.c's > st_init_table_with_size function. Its malloc and calloc return > values were not checked for NULL. > > However, there is another problem not fixed by the patch below. > The ADD_DIRECT macro calls "alloc" (aka malloc), and > immediately dereferences the result. A minimal patch > would be to use xmalloc in place of alloc here, but > I don't know if such semantics would be appropriate. Those calls are substituted with ruby_xmalloc and ruby_xcalloc, which never return NULL. -- Nobu Nakada