summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2021-05-04 14:49:31 +0300
committerNikita Malyavin <nikitamalyavin@gmail.com>2021-05-04 14:49:31 +0300
commita8a925dd22ae00494cc9ffdc1ff68906106a408c (patch)
treea857c565a22ec7f6f41d3efa72053a726a346af2 /sql/sql_udf.cc
parent2820f30dde3148df71e1d748ac705d98d60e0787 (diff)
parent72fa9dabadb4b0011f483ccbf1ef59e62d0ef1e0 (diff)
downloadmariadb-git-a8a925dd22ae00494cc9ffdc1ff68906106a408c.tar.gz
Merge branch bb-10.2-release into bb-10.3-release
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index d75b1cdedde..d0657cf973e 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -195,7 +195,7 @@ void udf_init()
DBUG_PRINT("info",("init udf record"));
LEX_CSTRING name;
name.str=get_field(&mem, table->field[0]);
- name.length = (uint) strlen(name.str);
+ name.length = (uint) safe_strlen(name.str);
char *dl_name= get_field(&mem, table->field[2]);
bool new_dl=0;
Item_udftype udftype=UDFTYPE_FUNCTION;
@@ -209,12 +209,12 @@ void udf_init()
On windows we must check both FN_LIBCHAR and '/'.
*/
- if (check_valid_path(dl_name, strlen(dl_name)) ||
+ if (!name.str || !dl_name || check_valid_path(dl_name, strlen(dl_name)) ||
check_string_char_length(&name, 0, NAME_CHAR_LEN,
system_charset_info, 1))
{
sql_print_error("Invalid row in mysql.func table for function '%.64s'",
- name.str);
+ safe_str(name.str));
continue;
}