summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-24 09:38:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-24 09:38:37 +0000
commitece972717b2e752532b222f03500f23b03280327 (patch)
tree14f984d7ad39dd888fbc20837e8fd6cfd236b20e /ruby.h
parentab7dac4027c063222ad5e4ea68012020f97c047d (diff)
security enhancement of dl library (need test).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ruby.h b/ruby.h
index 782838e..d1a371b 100644
--- a/ruby.h
+++ b/ruby.h
@@ -215,12 +215,14 @@ VALUE rb_string_value _((volatile VALUE*));
char *rb_string_value_ptr _((volatile VALUE*));
#define StringValue(v) if (TYPE(v) != T_STRING) rb_string_value(&(v))
+#define StringValuePtr(v) rb_string_value_ptr(&(v))
+
+void rb_check_safe_obj _((VALUE));
void rb_check_safe_str _((VALUE));
#define SafeStringValue(v) do {\
StringValue(v);\
- rb_check_safe_str(v);\
+ rb_check_safe_obj(v);\
} while (0)
-#define StringValuePtr(v) rb_string_value_ptr(&(v))
/* obsolete macro - use SafeStringValue(v) */
#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))