• Alexey Kopytov's avatar
    Bug #44796: valgrind: too many my_longlong10_to_str_8bit · 85645fe3
    Alexey Kopytov authored
                 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. 
    85645fe3
func_compress.result 4.99 KB