diff options
Diffstat (limited to 'transcode.c')
-rw-r--r-- | transcode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/transcode.c b/transcode.c index 5f7f856a33..ea6439d573 100644 --- a/transcode.c +++ b/transcode.c @@ -368,6 +368,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; @@ -375,7 +376,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; } |