Skip to content

Commit 50c4262

Browse files
committed
MDEV-16544 - crash in ha_sphinx::create()
Use table_arg that was passed to the function, instead of dereferencing this->table, which is a NULL pointer.
1 parent 1e37fa7 commit 50c4262

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/sphinx/ha_sphinx.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3440,7 +3440,7 @@ int ha_sphinx::create ( const char * name, TABLE * table_arg, HA_CREATE_INFO * )
34403440
if (
34413441
table_arg->s->keys!=1 ||
34423442
table_arg->key_info[0].user_defined_key_parts!=1 ||
3443-
strcasecmp ( table_arg->key_info[0].key_part[0].field->field_name, table->field[2]->field_name ) )
3443+
strcasecmp ( table_arg->key_info[0].key_part[0].field->field_name, table_arg->field[2]->field_name ) )
34443444
{
34453445
my_snprintf ( sError, sizeof(sError), "%s: there must be an index on '%s' column",
34463446
name, table_arg->field[2]->field_name );

0 commit comments

Comments
 (0)