KFar 0.65: fixed error handler

KFar_Arc 0.16: fixed crash when handling some extremely big 7z+lzma archives

git-svn-id: svn://kolibrios.org@1122 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-07-02 21:50:45 +00:00
parent 3d9673dba4
commit 44e90288dd
5 changed files with 21 additions and 12 deletions

View File

@ -7,8 +7,8 @@ memsize dd mem
dd stacktop
dd 0, app_path
version equ '0.64'
version_dword equ 0*10000h + 64
version equ '0.65'
version_dword equ 0*10000h + 65
min_width = 54
max_width = 255

View File

@ -2,8 +2,8 @@
; project name: KFar_Arc - plugin for KFar, which supports various archives
; target platform: KolibriOS
; compiler: FASM 1.67.14
; version: 0.15
; last update: 2009-02-01 (Feb 01, 2009)
; version: 0.16
; last update: 2009-07-03 (Jul 03, 2009)
; minimal KFar version: 0.43
; minimal kernel: no limit
;

View File

@ -134,6 +134,7 @@ end virtual
jb .literal
mov edx, edi
sub edx, [ebp+.rep0]
jc .before_buf
cmp edx, [ebp+streamInfo.bufPtr]
jb .before_buf
@@:
@ -177,12 +178,14 @@ end virtual
lea ebx, [9 + ebx + ebx]
mov edx, edi
sub edx, [ebp+.rep0]
jc @f
cmp edx, [ebp+streamInfo.bufPtr]
jae @f
jae .copy_byte
@@:
add edx, [ebp+streamInfo.bufSize]
cmp edx, [ebp+streamInfo.bufPtr]
jb return.err
@@:
.copy_byte:
mov al, [edx]
stosb
mov [ebp+.previousByte], al
@ -277,6 +280,7 @@ end virtual
ja return.err
mov esi, edi
sub esi, eax
jc .repmovsb0a
mov eax, [ebp+streamInfo.bufPtr]
sub eax, esi
ja .repmovsb0
@ -299,6 +303,9 @@ end virtual
mov [ebp+.continue], .restart_repmovsb
popad
ret
.repmovsb0a:
mov eax, [ebp+streamInfo.bufPtr]
sub eax, esi
.repmovsb0:
mov edx, [ebp+.dictSize]
; cmp edx, [ebp+streamInfo.bufSize]

View File

@ -168,6 +168,7 @@ get_error_msg:
pop eax
dec edi
push edx ecx
push -'0'
test eax, eax
jns @f
mov byte [edi], '-'
@ -177,13 +178,15 @@ get_error_msg:
xor edx, edx
mov ecx, 10
div ecx
add edx, '0'
mov byte [edi], dl
inc edi
push edx
test eax, eax
jnz @b
pop ecx edx
@@:
pop eax
add al, '0'
stosb
jnz @b
pop ecx edx
jmp .ret
libini_alloc:

View File

@ -100,9 +100,9 @@ view_file:
mov dword [ebp+viewer_data.col+4], eax
call viewer_clear_selection
pop eax
push eax
mov ebx, attrinfo
mov [ebx+21], eax
mov [readinfo.name], eax
.attr_retry:
mov edx, [ebp+viewer_data.hPlugin]
test edx, edx
@ -155,7 +155,6 @@ view_file:
lea eax, [ebp+viewer_data.buf]
mov [readinfo.data], eax
mov [ebp+viewer_data.buf_pos], eax
pop dword [readinfo.name]
mov eax, [ebp+viewer_data.hPlugin]
test eax, eax
jz .retry