diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-09-26 09:58:50 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-09-27 07:54:27 +0300 |
commit | 4e2a0c34b02dd556c2a521555662ed993cdc66a6 (patch) | |
tree | f80b8474f5f51038c08e600e23ea567d14494bb3 /plugin | |
parent | d30809a3cde823ad696304a941afe5a562bfa3ed (diff) | |
download | mariadb-git-4e2a0c34b02dd556c2a521555662ed993cdc66a6.tar.gz |
MDEV-10888: encryption.filekeys_emptyfile fails in buildbot with valgrind
Problem was that length of the filekeys file was not checked and if
length is less than OpenSSL_prefix_len uninitialized memory was
accessed.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/file_key_management/parser.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/file_key_management/parser.cc b/plugin/file_key_management/parser.cc index 628412bc171..294ccc9ff79 100644 --- a/plugin/file_key_management/parser.cc +++ b/plugin/file_key_management/parser.cc @@ -333,7 +333,7 @@ char* Parser::read_and_decrypt_file(const char *secret) // Check for file encryption uchar *decrypted; - if (is_prefix((char*)buffer, OpenSSL_prefix)) + if (file_size > OpenSSL_prefix_len && is_prefix((char*)buffer, OpenSSL_prefix)) { uchar key[OpenSSL_key_len]; uchar iv[OpenSSL_iv_len]; |