summaryrefslogtreecommitdiff
path: root/zlib
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-05-20 12:30:06 +0400
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-05-20 12:30:06 +0400
commit0b62b7f26d2bef58983f7c7e8b288dd9bce0cdcc (patch)
treea26c6bec3955954ec6879428333f88c62318fd91 /zlib
parent1d03fb715ebcd995648793fbdba57d9a2069ede6 (diff)
downloadmariadb-git-0b62b7f26d2bef58983f7c7e8b288dd9bce0cdcc.tar.gz
Bug #44796: valgrind: too many my_longlong10_to_str_8bit
warnings after uncompressed_length UNCOMPRESSED_LENGTH() did not validate its argument. In particular, if the argument length was less than 4 bytes, an uninitialized memory value was returned as a result. Since the result of COMPRESS() is either an empty string or a 4-byte length prefix followed by compressed data, the bug was fixed by ensuring that the argument of UNCOMPRESSED_LENGTH() is either an empty string or contains at least 5 bytes (as done in UNCOMPRESS()). This is the best we can do to validate input without decompressing. mysql-test/r/func_compress.result: Added a test case for bug #44796. mysql-test/t/func_compress.test: Added a test case for bug #44796. sql/item_strfunc.cc: Make sure that the argument of UNCOMPRESSED_LENGTH() contains at least 5 bytes (as done in UNCOMPRESS()).
Diffstat (limited to 'zlib')
0 files changed, 0 insertions, 0 deletions