summaryrefslogtreecommitdiff
path: root/mysys_ssl
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-05-27 17:41:55 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2019-05-27 17:48:15 +0200
commit7d3a759d42f92894820b6eeb6a0e798a5a57c464 (patch)
tree4c165cf1d180a538cf0d1b4ee666b45c9d416110 /mysys_ssl
parentd80065c2e41a314389e00c17dfd5f1c0be1e8b38 (diff)
downloadmariadb-git-7d3a759d42f92894820b6eeb6a0e798a5a57c464.tar.gz
MDEV-19604 WolfSSL breaks binlog_encryption.binlog_incident
Log_event_writer::encrypt_and_write() can pass NULL pointer as source buffer for the encryption. WolfSSL EVP_CipherUpdate(), rightfully rejects this as invalid parameter. Fix Log_event_writer::encrypt_and_write() and check, with assertion, that src parameterm is sane in MyCTX::update()
Diffstat (limited to 'mysys_ssl')
-rw-r--r--mysys_ssl/my_crypt.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc
index e83c949f21e..383cec07ddd 100644
--- a/mysys_ssl/my_crypt.cc
+++ b/mysys_ssl/my_crypt.cc
@@ -60,6 +60,7 @@ public:
}
virtual int update(const uchar *src, uint slen, uchar *dst, uint *dlen)
{
+ DBUG_ASSERT(src);
if (EVP_CipherUpdate(ctx, dst, (int*)dlen, src, slen) != 1)
return MY_AES_OPENSSL_ERROR;
return MY_AES_OK;