diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-06-19 18:05:10 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-27 09:40:54 +0200 |
commit | e7620ce4ce93c9c449b6d4ccffb7a6054a40deb4 (patch) | |
tree | fe8447205be014c9c8c9728a1ebb4ebe57de0430 /mysys_ssl | |
parent | e20be69eccff6d300ea27c508591dcc47e18932a (diff) | |
download | mariadb-git-e7620ce4ce93c9c449b6d4ccffb7a6054a40deb4.tar.gz |
MDEV-8281 aes_decrypt crashes in block_crypt()
fix aes_decrypt of yassl to support zero-length input
Diffstat (limited to 'mysys_ssl')
-rw-r--r-- | mysys_ssl/my_crypt.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc index 9f37883a9b8..dc3c4f63bdb 100644 --- a/mysys_ssl/my_crypt.cc +++ b/mysys_ssl/my_crypt.cc @@ -104,7 +104,7 @@ static int block_crypt(CipherMode cipher, Dir dir, } else { - int n= dest[source_length - 1]; + int n= source_length ? dest[source_length - 1] : 0; if (tail || n == 0 || n > MY_AES_BLOCK_SIZE) return MY_AES_BAD_DATA; *dest_length-= n; |