summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-05-19 15:20:10 +0200
committerunknown <serg@serg.mylan>2005-05-19 15:20:10 +0200
commit185b5e406740fbc0f1ea78f5ec82e95ccbefc382 (patch)
treeda2c7aa4f986716b622d061f3949dc2c92a1df20 /sql/sql_udf.cc
parentf87f045065197aa036ebf023cd8a6da76e23e013 (diff)
parent27378545f9d9265e4dc9bec00e560f717457a8e7 (diff)
downloadmariadb-git-185b5e406740fbc0f1ea78f5ec82e95ccbefc382.tar.gz
merged
sql/sql_udf.cc: Auto merged sql/unireg.cc: Auto merged
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index f5d64efb5e9..ebd753da9cf 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -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);