Browse Source

MDEV-35472 Server crash in ha_storage_put_memlim upon reading from INNODB_LOCKS

ha_storage_put_memlim(): Initialize node->next in order to avoid a
crash on a subsequent invocation, due to dereferencing an uninitialized
pointer.

This fixes a regression that had been introduced in
commit ccb6cd8053 (MDEV-35189).

Reviewed by: Debarun Banerjee
pull/3649/head
Marko Mäkelä 11 months ago
parent
commit
2255be0395
  1. 1
      storage/innobase/ha/ha0storage.cc

1
storage/innobase/ha/ha0storage.cc

@ -67,6 +67,7 @@ ha_storage_put_memlim(
(mem_heap_alloc(storage->heap, sizeof *node + data_len));
node->data_len= data_len;
node->data= &node[1];
node->next= nullptr;
memcpy(const_cast<void*>(node->data), data, data_len);
*after= node;
return node->data;

Loading…
Cancel
Save