Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2015-08-16 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:55 +0300
commitcba375916fb18db8b9101aedf4fa079e019311b3 (patch)
tree6275ae5fc2a8dd337ab0327180c871807e6ba5d4 /C/LzmaDec.c
parent54490d51d5c6b0d794dcbad2d634d4c95fc25b6c (diff)
15.0615.06
Diffstat (limited to 'C/LzmaDec.c')
-rw-r--r--C/LzmaDec.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/C/LzmaDec.c b/C/LzmaDec.c
index c8326667..27efbaba 100644
--- a/C/LzmaDec.c
+++ b/C/LzmaDec.c
@@ -1,5 +1,5 @@
/* LzmaDec.c -- LZMA Decoder
-2015-05-14 : Igor Pavlov : Public domain */
+2015-06-23 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -438,10 +438,16 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
if (checkDicSize == 0)
{
if (distance >= processedPos)
+ {
+ p->dicPos = dicPos;
return SZ_ERROR_DATA;
+ }
}
else if (distance >= checkDicSize)
+ {
+ p->dicPos = dicPos;
return SZ_ERROR_DATA;
+ }
state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
}
@@ -453,7 +459,10 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
SizeT pos;
if ((rem = limit - dicPos) == 0)
+ {
+ p->dicPos = dicPos;
return SZ_ERROR_DATA;
+ }
curLen = ((rem < len) ? (unsigned)rem : len);
pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0);