From 218823e9b21b3f68cf188e3aa31f4ee56b60e2f1 Mon Sep 17 00:00:00 2001 From: coderb Date: Wed, 20 Dec 2017 18:13:04 -0500 Subject: [PATCH] rar5: unpack bugfix --- .../Compressors/Rar/UnpackV2017/Unpack.unpack_cpp.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SharpCompress/Compressors/Rar/UnpackV2017/Unpack.unpack_cpp.cs b/src/SharpCompress/Compressors/Rar/UnpackV2017/Unpack.unpack_cpp.cs index 4126bf34..5645edec 100644 --- a/src/SharpCompress/Compressors/Rar/UnpackV2017/Unpack.unpack_cpp.cs +++ b/src/SharpCompress/Compressors/Rar/UnpackV2017/Unpack.unpack_cpp.cs @@ -283,6 +283,7 @@ void MakeDecodeTables(byte[] LengthTable, int offset, DecodeTable Dec,uint Size) // so we cannot use the original DecodePos. uint[] CopyDecodePos = new uint[Dec.DecodePos.Length]; //memcpy(CopyDecodePos,Dec->DecodePos,sizeof(CopyDecodePos)); + Array.Copy(Dec.DecodePos, 0, CopyDecodePos, 0, CopyDecodePos.Length); // For every bit length in the bit length table and so for every item // of alphabet.