mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1
This commit is contained in:
@ -194,7 +194,9 @@ void udf_init()
|
||||
This is done to ensure that only approved dll from the system
|
||||
directories are used (to make this even remotely secure).
|
||||
*/
|
||||
if (strchr(dl_name, '/') || name.length > NAME_LEN)
|
||||
if (strchr(dl_name, '/') ||
|
||||
IF_WIN(strchr(dl_name, '\\'),0) ||
|
||||
strlen(name.str) > NAME_LEN)
|
||||
{
|
||||
sql_print_error("Invalid row in mysql.func table for function '%.64s'",
|
||||
name.str);
|
||||
@ -223,7 +225,7 @@ void udf_init()
|
||||
}
|
||||
tmp->dlhandle = dl;
|
||||
{
|
||||
char buf[MAX_FIELD_NAME+16], *missing;
|
||||
char buf[NAME_LEN+16], *missing;
|
||||
if ((missing= init_syms(tmp, buf)))
|
||||
{
|
||||
sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), missing);
|
||||
@ -410,7 +412,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
|
||||
This is done to ensure that only approved dll from the system
|
||||
directories are used (to make this even remotely secure).
|
||||
*/
|
||||
if (strchr(udf->dl, '/'))
|
||||
if (strchr(udf->dl, '/') || IF_WIN(strchr(dl_name, '\\'),0))
|
||||
{
|
||||
my_message(ER_UDF_NO_PATHS, ER(ER_UDF_NO_PATHS), MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
@ -441,7 +443,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
|
||||
}
|
||||
udf->dlhandle=dl;
|
||||
{
|
||||
char buf[MAX_FIELD_NAME+16], *missing;
|
||||
char buf[NAME_LEN+16], *missing;
|
||||
if ((missing= init_syms(udf, buf)))
|
||||
{
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), missing);
|
||||
|
Reference in New Issue
Block a user