mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
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
This commit is contained in:
parent
ec58fce3da
commit
2255be0395
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue