MDEV-4513 Valgrind warnings (Conditional jump or move depends on uninitialised value) in inflate on UNCOMPRESS
This commit is contained in:
parent
5d0122bd77
commit
cc2c296309
@ -147,3 +147,11 @@ DROP TABLE t1;
|
|||||||
#
|
#
|
||||||
# End of 5.3 tests
|
# End of 5.3 tests
|
||||||
#
|
#
|
||||||
|
SELECT UNCOMPRESS(CAST(0 AS BINARY(5)));
|
||||||
|
UNCOMPRESS(CAST(0 AS BINARY(5)))
|
||||||
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1259 ZLIB: Input data corrupted
|
||||||
|
#
|
||||||
|
# End of 5.5 tests
|
||||||
|
#
|
||||||
|
@ -136,3 +136,12 @@ DROP TABLE t1;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # End of 5.3 tests
|
--echo # End of 5.3 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-4513 Valgrind warnings (Conditional jump or move depends on uninitialised value) in inflate on UNCOMPRESS
|
||||||
|
#
|
||||||
|
SELECT UNCOMPRESS(CAST(0 AS BINARY(5)));
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 5.5 tests
|
||||||
|
--echo #
|
||||||
|
@ -3720,7 +3720,7 @@ String *Item_func_uncompress::val_str(String *str)
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if ((err= uncompress((Byte*)buffer.ptr(), &new_size,
|
if ((err= uncompress((Byte*)buffer.ptr(), &new_size,
|
||||||
((const Bytef*)res->ptr())+4,res->length())) == Z_OK)
|
((const Bytef*)res->ptr())+4,res->length()-4)) == Z_OK)
|
||||||
{
|
{
|
||||||
buffer.length((uint32) new_size);
|
buffer.length((uint32) new_size);
|
||||||
return &buffer;
|
return &buffer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user