Ftpc: fix for bugs with buffers 'remote_list_buf' and 'buf_buffer2'
This commit is contained in:
@@ -105,7 +105,6 @@ console: ;//////////////////////////////////////////////////////////////////////
|
|||||||
mov eax, [esp+36]
|
mov eax, [esp+36]
|
||||||
call write_to_file
|
call write_to_file
|
||||||
|
|
||||||
@@:
|
|
||||||
popad
|
popad
|
||||||
ret 4
|
ret 4
|
||||||
|
|
||||||
|
@@ -372,7 +372,6 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
|||||||
sub ecx, 2 ; 0a0d is not included
|
sub ecx, 2 ; 0a0d is not included
|
||||||
call write_to_file
|
call write_to_file
|
||||||
|
|
||||||
@@:
|
|
||||||
popad
|
popad
|
||||||
ret 4
|
ret 4
|
||||||
|
|
||||||
@@ -392,13 +391,16 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
|||||||
;< none ;;
|
;< none ;;
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
|
|
||||||
push edx
|
cmp eax, 1
|
||||||
push eax
|
jl data_loop
|
||||||
|
push edx eax
|
||||||
; check if any incomplete entry to be parsed
|
; check if any incomplete entry to be parsed
|
||||||
cmp byte[remote_list_buf], 0
|
cmp byte[remote_list_buf], 0
|
||||||
je .no_backlog
|
je .no_backlog
|
||||||
|
|
||||||
; find end of remote_list_buf
|
; find end of remote_list_buf
|
||||||
mov edi, remote_list_buf
|
mov edi, remote_list_buf
|
||||||
|
mov ecx, 1024 ;buffer size
|
||||||
mov al, 0
|
mov al, 0
|
||||||
repne scasb
|
repne scasb
|
||||||
; copy rest of the incomplete entry to remote_list_buf
|
; copy rest of the incomplete entry to remote_list_buf
|
||||||
@@ -494,9 +496,9 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
|||||||
|
|
||||||
.store_last_entry:
|
.store_last_entry:
|
||||||
; find index of the last incomplete entry
|
; find index of the last incomplete entry
|
||||||
mov ecx, -1
|
|
||||||
mov eax, [esp]
|
mov eax, [esp]
|
||||||
lea edi, [buf_buffer2+eax-2]
|
lea edi, [buf_buffer2+eax-2]
|
||||||
|
mov ecx, eax
|
||||||
mov al, 0x0a
|
mov al, 0x0a
|
||||||
std
|
std
|
||||||
repne scasb
|
repne scasb
|
||||||
@@ -514,8 +516,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
|||||||
stdcall [tl_cur_beg], tree2
|
stdcall [tl_cur_beg], tree2
|
||||||
or dword[tree2.style], 8
|
or dword[tree2.style], 8
|
||||||
call .draw ; to update tree list immediately in case of "auto_list"
|
call .draw ; to update tree list immediately in case of "auto_list"
|
||||||
pop eax
|
pop eax edx
|
||||||
pop edx
|
|
||||||
jmp data_loop
|
jmp data_loop
|
||||||
|
|
||||||
; clear tree list and add ".." node before executing "LIST"
|
; clear tree list and add ".." node before executing "LIST"
|
||||||
|
Reference in New Issue
Block a user