mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
BUG#24358 - Table access crashes server
Having broken .frm, particulary number of field names does not match number of fields, causes server crash. Refuse to open a table if number of field names in a table is not equal to number of fields in a table. No test case, since it requires broken .frm file.
This commit is contained in:
parent
ca62c94230
commit
77085c8efe
1 changed files with 2 additions and 0 deletions
|
@ -373,6 +373,8 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
|
|||
memcpy(comment_pos, disk_buff+read_length-com_length, com_length);
|
||||
|
||||
fix_type_pointers(&int_array,&outparam->fieldnames,1,&names);
|
||||
if (outparam->fieldnames.count != outparam->fields)
|
||||
goto err_not_open;
|
||||
fix_type_pointers(&int_array,outparam->intervals,interval_count,
|
||||
&names);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue