diff --git a/ChangeLog b/ChangeLog index c6d531821e..84e96d3a3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jun 4 10:46:33 2010 Nobuyoshi Nakada + + * ext/dl/cfunc.c (rb_dlcfunc_inspect): should taint the result. + [ruby-dev:41533] + Fri Jun 4 09:37:15 2010 NAKAMURA Usaku * gc.c (gc_sweep): suppress a warning on VC, again. diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c index 38ff2cb8b1..536a7231a8 100644 --- a/ext/dl/cfunc.c +++ b/ext/dl/cfunc.c @@ -284,15 +284,18 @@ rb_dlcfunc_set_ptr(VALUE self, VALUE addr) static VALUE rb_dlcfunc_inspect(VALUE self) { + VALUE val; struct cfunc_data *cfunc; TypedData_Get_Struct(self, struct cfunc_data, &dlcfunc_data_type, cfunc); - return rb_sprintf("#", + val = rb_sprintf("#", cfunc, cfunc->ptr, cfunc->type, cfunc->name ? cfunc->name : ""); + OBJ_TAINT(val); + return val; }