From ece972717b2e752532b222f03500f23b03280327 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 24 Mar 2003 09:38:37 +0000 Subject: security enhancement of dl library (need test). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ruby.h') diff --git a/ruby.h b/ruby.h index 782838ed97..d1a371b4ee 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)) -- cgit v1.2.1