aboutsummaryrefslogtreecommitdiffstats
path: root/transcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/transcode.c b/transcode.c
index 68ac71755c..482fb6bf17 100644
--- a/transcode.c
+++ b/transcode.c
@@ -370,6 +370,7 @@ load_transcoder_entry(transcoder_entry_t *entry)
const char *lib = entry->lib;
size_t len = strlen(lib);
char path[sizeof(transcoder_lib_prefix) + MAX_TRANSCODER_LIBNAME_LEN];
+ VALUE fn;
entry->lib = NULL;
@@ -377,7 +378,10 @@ load_transcoder_entry(transcoder_entry_t *entry)
return NULL;
memcpy(path, transcoder_lib_prefix, sizeof(transcoder_lib_prefix) - 1);
memcpy(path + sizeof(transcoder_lib_prefix) - 1, lib, len + 1);
- if (!rb_require(path))
+ fn = rb_str_new2(path);
+ FL_UNSET(fn, FL_TAINT|FL_UNTRUSTED);
+ OBJ_FREEZE(fn);
+ if (!rb_require_safe(fn, rb_safe_level()))
return NULL;
}