diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-06-19 13:02:02 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-06-19 13:02:02 +0400 |
commit | 15b92915ed93661a56f40430204d18bf7b7cf1fc (patch) | |
tree | 6e56d12a0f36b91b895936ab1f8e6d59c698fa37 /sql/table.cc | |
parent | e425216045c7a998139bd953b0aed83c3a085c8c (diff) | |
download | mariadb-git-15b92915ed93661a56f40430204d18bf7b7cf1fc.tar.gz |
MDEV-15834 The code in TABLE_SHARE::init_from_binary_frm_image() is not safe
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc index 552f514283d..87a249defa0 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1462,7 +1462,11 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, if ((uchar)field_type == (uchar)MYSQL_TYPE_VIRTUAL) { - DBUG_ASSERT(interval_nr); // Expect non-null expression + if (!interval_nr) // Expect non-null expression + { + error= 4; + goto err; + } /* The interval_id byte in the .frm file stores the length of the expression statement for a virtual column. |