FCompression::UncompressMemory causing a crash sometimes

I’ve been trying to use FCompression::UncompressMemory with malformed data for quite a while now without much success. I’ve tried with 4.16, 4.17 and now the preview 4.18 but always get the same result. If the compressed data is correct but the parameter UncompressSize doesn’t match the size of the decompressed data it just crashes. If the compressed data is wrong it seems to always return true, which is also strange but managable.
Since I can’t trust the data I’m decompressing I want the function to be able to fail gracefully and not crash the game.

It’s possible to use this code to reproduce.

bool TestDecompress(const TArray<uint8> &compressedData, int32 expectedDecompressedSize)
	TArray<uint8> outputArray;
	return FCompression::UncompressMemory(ECompressionFlags::COMPRESS_ZLIB, outputArray.GetData(), expectedDecompressedSize, compressedData.GetData(), compressedData.Num());

I’ve tracked down the crash and basically it’s a check in Compression.cpp:

check( UncompressedSize == ZUncompressedSize );

I could remove this line of course, or maybe duplicate the function to avoid introducing some bug, but it seems like a strange behaviour in the first place since the function already returns a success bool. Will this be changed anytime soon?