forked from KolibriOS/kolibrios
kfar_arc: bugfix in loading of 7z archives
git-svn-id: svn://kolibrios.org@893 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c6b57fbd1a
commit
5c194bbe10
@ -1834,7 +1834,7 @@ _7z.decode:
|
|||||||
mov esi, [.pStreams]
|
mov esi, [.pStreams]
|
||||||
mov eax, [esi+eax*4]
|
mov eax, [esi+eax*4]
|
||||||
call fillBuf
|
call fillBuf
|
||||||
mov ecx, [eax+streamInfo.bufSize]
|
mov ecx, [eax+streamInfo.bufDataLen]
|
||||||
mov esi, [eax+streamInfo.bufPtr]
|
mov esi, [eax+streamInfo.bufPtr]
|
||||||
mov edi, [.outBufferPtr]
|
mov edi, [.outBufferPtr]
|
||||||
add edi, [.outBufferRead]
|
add edi, [.outBufferRead]
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
; project name: KFar_Arc - plugin for KFar, which supports various archives
|
; project name: KFar_Arc - plugin for KFar, which supports various archives
|
||||||
; target platform: KolibriOS
|
; target platform: KolibriOS
|
||||||
; compiler: FASM 1.67.14
|
; compiler: FASM 1.67.14
|
||||||
; version: 0.12
|
; version: 0.13
|
||||||
; last update: 2007-10-06 (Oct 06, 2007)
|
; last update: 2008-11-02 (Nov 02, 2008)
|
||||||
; minimal KFar version: 0.41
|
; minimal KFar version: 0.41
|
||||||
; minimal kernel: no limit
|
; minimal kernel: no limit
|
||||||
;
|
;
|
||||||
|
@ -132,14 +132,22 @@ end virtual
|
|||||||
lea eax, [ebp + eax + .p+.Literal*4]
|
lea eax, [ebp + eax + .p+.Literal*4]
|
||||||
cmp ebx, .kNumLitStates
|
cmp ebx, .kNumLitStates
|
||||||
jb .literal
|
jb .literal
|
||||||
xor edx, edx
|
mov edx, edi
|
||||||
sub edx, [ebp+.rep0]
|
sub edx, [ebp+.rep0]
|
||||||
mov dl, [edi + edx]
|
cmp edx, [ebp+streamInfo.bufPtr]
|
||||||
|
jb .before_buf
|
||||||
|
@@:
|
||||||
|
mov dl, [edx]
|
||||||
call .LzmaLiteralDecodeMatch
|
call .LzmaLiteralDecodeMatch
|
||||||
jmp @f
|
jmp .got_byte
|
||||||
|
.before_buf:
|
||||||
|
add edx, [ebp+streamInfo.bufSize]
|
||||||
|
cmp edx, [ebp+streamInfo.bufPtr]
|
||||||
|
jb return.err
|
||||||
|
jmp @b
|
||||||
.literal:
|
.literal:
|
||||||
call .LzmaLiteralDecode
|
call .LzmaLiteralDecode
|
||||||
@@:
|
.got_byte:
|
||||||
mov [ebp+.previousByte], al
|
mov [ebp+.previousByte], al
|
||||||
stosb
|
stosb
|
||||||
mov al, bl
|
mov al, bl
|
||||||
@ -167,9 +175,15 @@ end virtual
|
|||||||
cmp bl, 7
|
cmp bl, 7
|
||||||
setae bl
|
setae bl
|
||||||
lea ebx, [9 + ebx + ebx]
|
lea ebx, [9 + ebx + ebx]
|
||||||
xor edx, edx
|
mov edx, edi
|
||||||
sub edx, [ebp+.rep0]
|
sub edx, [ebp+.rep0]
|
||||||
mov al, [edi + edx]
|
cmp edx, [ebp+streamInfo.bufPtr]
|
||||||
|
jae @f
|
||||||
|
add edx, [ebp+streamInfo.bufSize]
|
||||||
|
cmp edx, [ebp+streamInfo.bufPtr]
|
||||||
|
jb return.err
|
||||||
|
@@:
|
||||||
|
mov al, [edx]
|
||||||
stosb
|
stosb
|
||||||
mov [ebp+.previousByte], al
|
mov [ebp+.previousByte], al
|
||||||
jmp .main_loop
|
jmp .main_loop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user