summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/dl/cfunc.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c6d531821e0..84e96d3a3ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jun 4 10:46:33 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/dl/cfunc.c (rb_dlcfunc_inspect): should taint the result.
+ [ruby-dev:41533]
+
Fri Jun 4 09:37:15 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* gc.c (gc_sweep): suppress a warning on VC, again.
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index 38ff2cb8b1e..536a7231a83 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("#<DL::CFunc:%p ptr=%p type=%d name='%s'>",
+ val = rb_sprintf("#<DL::CFunc:%p ptr=%p type=%d name='%s'>",
cfunc,
cfunc->ptr,
cfunc->type,
cfunc->name ? cfunc->name : "");
+ OBJ_TAINT(val);
+ return val;
}