354
376
struct st_plugin_dl *tmp, plugin_dl;
356
378
DBUG_ENTER("plugin_dl_add");
379
DBUG_PRINT("enter", ("dl->str: '%s', dl->length: %d",
357
381
plugin_dir_len= strlen(opt_plugin_dir);
359
383
Ensure that the dll doesn't have a path.
360
384
This is done to ensure that only approved libraries from the
361
385
plugin directory are used (to make this even remotely secure).
363
if (my_strchr(files_charset_info, dl->str, dl->str + dl->length, FN_LIBCHAR) ||
364
388
check_string_char_length((LEX_STRING *) dl, "", NAME_CHAR_LEN,
365
389
system_charset_info, 1) ||
366
390
plugin_dir_len + dl->length + 1 >= FN_REFLEN)