diff options
author | Varun Gupta <varunraiko1803@gmail.com> | 2017-12-20 02:27:03 +0530 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-20 11:50:22 +0200 |
commit | 924db8b4ed3f268cbe91a1734611f4dc2311c7be (patch) | |
tree | e2b26041b80eab38ca36c29e9475d7a28ca61546 /mysql-test/t/having.test | |
parent | cfa18e4ae11e77579ee7c577356ed7b4f874c8c7 (diff) | |
download | mariadb-git-924db8b4ed3f268cbe91a1734611f4dc2311c7be.tar.gz |
MDEV-12350: Heap corruption, overrun buffer, ASAN errors, server crash in my_fill_8bit / filesort
In the function make_sortkey a tmp buffer was defined and in the absence of
param->tmp_buffer, tmp buffer used the sort_keys buffer. sort_keys buffer
has a length defined in sort_field->length, while param->tmp_buffer is
stored in param->rec_length. Make sure to use the appropriate length
based on which buffer we are using otherwise we'll overflow.
Also added a type cast to size_t during the calculation of the sort keys
buffer size to avoid an oveflow if the buffer size exceeds 32 bits.
Diffstat (limited to 'mysql-test/t/having.test')
0 files changed, 0 insertions, 0 deletions