summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-05-15 10:44:05 +0300
committerMonty <monty@mariadb.org>2020-05-15 10:44:05 +0300
commit277aa85c9b42e2a7b778d196b307e45711ccc895 (patch)
treed9c1951ef73f93b3172e9a162997b552aa27550d /sql
parent1b165720745fee94d95798418d6a8bbaaf3b4c45 (diff)
downloadmariadb-git-277aa85c9b42e2a7b778d196b307e45711ccc895.tar.gz
Fixed bugs found by valgrind
Other things: - Removed innodb_encryption_tables.test from valgrind as it takes a REALLY long time
Diffstat (limited to 'sql')
-rw-r--r--sql/field.cc2
-rw-r--r--sql/log_event.cc2
2 files changed, 3 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc
index f96755f5f51..0e8dd26445f 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1438,7 +1438,7 @@ void Field::error_generated_column_function_is_not_allowed(THD *thd,
QT_ITEM_IDENT_SKIP_TABLE_NAMES));
my_error(ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED,
MYF(error ? 0 : ME_JUST_WARNING),
- tmp.c_ptr(), vcol_info->get_vcol_type_name(),
+ tmp.c_ptr_safe(), vcol_info->get_vcol_type_name(),
const_cast<const char*>(field_name));
}
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 7341add598f..f9e4365ff94 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -10228,6 +10228,8 @@ const char *sql_ex_info::init(const char *buf, const char *buf_end,
}
else
{
+ if (buf_end - buf < 7)
+ return 0; // Wrong data
field_term_len= enclosed_len= line_term_len= line_start_len= escaped_len=1;
field_term = buf++; // Use first byte in string
enclosed= buf++;