summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorunknown <ndbdev@dl145c.mysql.com>2005-05-20 06:25:02 +0200
committerunknown <ndbdev@dl145c.mysql.com>2005-05-20 06:25:02 +0200
commitd38743ffc3a56118a2d18ae7971e67a1a922460b (patch)
tree57c3e1e510646f339bdaeadb1d430a67bcf5e402 /sql/sql_udf.cc
parentd454da56c00442f4c1857ed292ff6ef353a1f115 (diff)
parent3034935a875d959c21af79d08fbda2a1d32f11c6 (diff)
downloadmariadb-git-d38743ffc3a56118a2d18ae7971e67a1a922460b.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1 configure.in: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/sql_udf.cc: Auto merged sql/unireg.cc: Auto merged storage/ndb/include/kernel/ndb_limits.h: Auto merged storage/ndb/include/kernel/signaldata/GetTabInfo.hpp: Auto merged storage/ndb/include/ndbapi/Ndb.hpp: Auto merged storage/ndb/include/ndbapi/ndbapi_limits.h: Auto merged storage/ndb/include/transporter/TransporterDefinitions.hpp: Auto merged storage/ndb/src/common/transporter/Packer.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp: Auto merged storage/ndb/src/ndbapi/Ndb.cpp: Auto merged storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Auto merged storage/ndb/src/ndbapi/NdbImpl.hpp: Auto merged storage/ndb/src/ndbapi/Ndbinit.cpp: Auto merged storage/ndb/src/ndbapi/ndb_cluster_connection.cpp: 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 dc6e8380cfe..575d75380eb 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);