aboutsummaryrefslogtreecommitdiffstats
path: root/ext/dl/sym.c
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-24 07:56:37 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-24 07:56:37 +0000
commitab7dac4027c063222ad5e4ea68012020f97c047d (patch)
treec5df9566e9f8fd8853275059bf9056a954420d6b /ext/dl/sym.c
parente5282ef182fbd11e2cfd41b752003367320e409f (diff)
downloadruby-ab7dac4027c063222ad5e4ea68012020f97c047d.tar.gz
Added rb_secure(4). (Thanks to Minero Aoki)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/sym.c')
-rw-r--r--ext/dl/sym.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/dl/sym.c b/ext/dl/sym.c
index 95a813cc1f..7e18e61b5e 100644
--- a/ext/dl/sym.c
+++ b/ext/dl/sym.c
@@ -77,6 +77,7 @@ rb_dlsym_new(void (*func)(), const char *name, const char *type)
struct sym_data *data;
const char *ptype;
+ rb_secure(4);
if( !type || !type[0] ){
return rb_dlptr_new((void*)func, 0, 0);
}
@@ -329,6 +330,7 @@ rb_dlsym_call(int argc, VALUE argv[], VALUE self)
long ftype;
void *func;
+ rb_secure(4);
Data_Get_Struct(self, struct sym_data, sym);
DEBUG_CODE({
printf("rb_dlsym_call(): type = '%s', func = 0x%x\n", sym->type, sym->func);