Project

General

Profile

Bug #2794 ยป 0001-sanity-DL-strdup.patch

kosaki (Motohiro KOSAKI), 02/27/2010 12:22 AM

View differences:

ext/dl/dl.c
588 588
rb_dl_strdup(VALUE self, VALUE str)
589 589
{
590 590
  SafeStringValue(str);
591
  return rb_dlptr_new(strdup(RSTRING(str)->ptr), RSTRING(str)->len, dlfree);
591
  return rb_dlptr_new(strdup(RSTRING(str)->ptr), strlen(RSTRING(str)->ptr)+1, dlfree);
592 592
}
593 593

  
594 594
static VALUE
595
-