Skip to content

Instantly share code, notes, and snippets.

@kyprizel
Created April 22, 2020 09:57
Show Gist options
  • Select an option

  • Save kyprizel/07dda1cb91d8c6529f32817e4a25f776 to your computer and use it in GitHub Desktop.

Select an option

Save kyprizel/07dda1cb91d8c6529f32817e4a25f776 to your computer and use it in GitHub Desktop.
CVE-2019-16535 medium
void CompressedReadBufferBase::decompress(char * to, size_t size_decompressed, size_t size_compressed_without_checksum)
{
...
UInt8 method = ICompressionCodec::readMethod(compressed_buffer);
if (!codec)
codec = CompressionCodecFactory::instance().get(method);
else if (codec->getMethodByte() != method)
throw Exception("Data compressed with different methods, given method byte "
+ getHexUIntLowercase(method)
+ ", previous method byte "
+ getHexUIntLowercase(codec->getMethodByte()),
ErrorCodes::CANNOT_DECOMPRESS);
codec->decompress(compressed_buffer, size_compressed_without_checksum, to);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment