<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,6 +31,15 @@ Mon Aug  4 13:39:53 2008  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
 Mon Aug  4 12:25:08 2008  NAKAMURA Usaku  &lt;usa@ruby-lang.org&gt;
 
 	* numeric.c (check_uint, rb_num2uint, rb_fix2uint): fixed wrong check
+Mon Aug 11 09:34:52 2008  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* ext/dl/dl.c (rb_str_to_ptr): should propagate taint to dlptr.
+
+	* ext/dl/dl.c (rb_ary_to_ptr): ditto.
+
+	* ext/dl/sym.c (rb_dlsym_call): should check taint of DLPtrData as
+	  well.
+
 	  about 64bit positive value.
 Mon Aug  4 12:25:08 2008  NAKAMURA Usaku  &lt;usa@ruby-lang.org&gt;
 </diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -522,12 +522,15 @@ rb_str_to_ptr(VALUE self)
 {
   char *ptr;
   int  len;
+  VALUE p;
 
   len = RSTRING(self)-&gt;len;
   ptr = (char*)dlmalloc(len + 1);
   memcpy(ptr, RSTRING(self)-&gt;ptr, len);
   ptr[len] = '\0';
-  return rb_dlptr_new((void*)ptr,len,dlfree);
+  p = rb_dlptr_new((void*)ptr,len,dlfree);
+  OBJ_INFECT(p, self);
+  return p;
 }
 
 VALUE
@@ -545,7 +548,12 @@ rb_ary_to_ptr(int argc, VALUE argv[], VALUE self)
     ptr = rb_ary2cary(0, self, &amp;size);
     break;
   }
-  return ptr ? rb_dlptr_new(ptr, size, dlfree) : Qnil;
+  if (ptr) {
+      VALUE p = rb_dlptr_new(ptr, size, dlfree);
+      OBJ_INFECT(p, self);
+      return p;
+  }
+  return Qnil;
 }
 
 VALUE
@@ -563,7 +571,7 @@ rb_io_to_ptr(VALUE self)
 VALUE
 rb_dl_dlopen(int argc, VALUE argv[], VALUE self)
 {
-  rb_secure(4);
+  rb_secure(2);
   return rb_class_new_instance(argc, argv, rb_cDLHandle);
 }
 </diff>
      <filename>ext/dl/dl.c</filename>
    </modified>
    <modified>
      <diff>@@ -492,6 +492,7 @@ rb_dlsym_call(int argc, VALUE argv[], VALUE self)
 	      rb_raise(rb_eDLTypeError, &quot;unexpected type of argument #%d&quot;, i);
 	    }
 	  }
+	  rb_check_safe_obj(pval);
 	  Data_Get_Struct(pval, struct ptr_data, data);
 	  ANY2P(args[i]) = DLVOIDP(data-&gt;ptr);
 	}</diff>
      <filename>ext/dl/sym.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,15 @@
 #define RUBY_VERSION &quot;1.8.6&quot;
-#define RUBY_RELEASE_DATE &quot;2008-08-08&quot;
+#define RUBY_RELEASE_DATE &quot;2008-08-11&quot;
 #define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20080808
-#define RUBY_PATCHLEVEL 286
+#define RUBY_RELEASE_CODE 20080811
+#define RUBY_PATCHLEVEL 287
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
 #define RUBY_VERSION_TEENY 6
 #define RUBY_RELEASE_YEAR 2008
 #define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 8
+#define RUBY_RELEASE_DAY 11
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];</diff>
      <filename>version.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9c891ace13469ae45049f02de139f5bc2d2eeaad</id>
    </parent>
  </parents>
  <author>
    <name>shyouhei</name>
    <email>shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </author>
  <url>http://github.com/FooBarWidget/rubyenterpriseedition/commit/96cd821ae29202dd64e2f27fd1e48e6222dda179</url>
  <id>96cd821ae29202dd64e2f27fd1e48e6222dda179</id>
  <committed-date>2008-08-10T17:36:08-07:00</committed-date>
  <authored-date>2008-08-10T17:36:08-07:00</authored-date>
  <message>merge revision(s) 17872:
	* ext/dl/dl.c (rb_str_to_ptr): should propagate taint to dlptr.
	* ext/dl/dl.c (rb_ary_to_ptr): ditto.
	* ext/dl/sym.c (rb_dlsym_call): should check taint of DLPtrData as
	  well.


git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_6@18477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e</message>
  <tree>6812f74ddb17fee08ec75a64d9f63eb661c3c15b</tree>
  <committer>
    <name>shyouhei</name>
    <email>shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </committer>
</commit>
