diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-12-03 20:26:42 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-06 09:45:50 +0100 |
commit | 952856c810c7a44678960a455062531279ddf113 (patch) | |
tree | 5708578a90fe764168fb8af709cd30339928d9f3 /sql/encryption.cc | |
parent | 611f91605adce17df87acf96b5aede0b73d0fc12 (diff) | |
download | mariadb-git-952856c810c7a44678960a455062531279ddf113.tar.gz |
MDEV-11288 Server crashes in Binlog_crypt_data::init trying to feed encrypted log without decryption capabilities
Diffstat (limited to 'sql/encryption.cc')
-rw-r--r-- | sql/encryption.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/encryption.cc b/sql/encryption.cc index 52aaef896dd..a92296e8b66 100644 --- a/sql/encryption.cc +++ b/sql/encryption.cc @@ -29,6 +29,10 @@ uint no_key(uint) { return ENCRYPTION_KEY_VERSION_INVALID; } +uint zero_size(uint,uint) +{ + return 0; +} static int ctx_init(void *ctx, const unsigned char* key, unsigned int klen, const unsigned char* iv, unsigned int ivlen, int flags, @@ -97,6 +101,7 @@ int finalize_encryption_plugin(st_plugin_int *plugin) encryption_handler.encryption_key_get_func= (uint (*)(uint, uint, uchar*, uint*))no_key; encryption_handler.encryption_key_get_latest_version_func= no_key; + encryption_handler.encryption_ctx_size_func= zero_size; if (plugin && plugin->plugin->deinit && plugin->plugin->deinit(NULL)) { |