Commit ae0afad5 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-32746 SIGSEGV on recovery when using innodb_encrypt_log and PMEM

recv_ring::copy_if_needed(): If len==0, do not decrypt anything,
to avoid unnecessary work and a possible crash.

This is similar to the condition recv_buf::copy_if_needed() where
a similar condition was present since the beginning
(commit 685d958e).

Tested by: Matthias Leich
parent e6f56e39
......@@ -2409,7 +2409,7 @@ struct recv_ring : public recv_buf
{
const size_t s(*this - start);
ut_ad(s + len <= srv_page_size);
if (!log_sys.is_encrypted())
if (!len || !log_sys.is_encrypted())
{
if (start.ptr + s == ptr && ptr + len <= end())
return ptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment