forked from KolibriOS/kolibrios
File system: new function 70.4 to set file size
Graphics: fixed error when putimage and drawrect do not draw pixels on right and bottom window sides Processes: fixed kernel fault when program to load is too big Programs: EYES: now it works with new kernel (rev. 130). Size optimization. Blinking deleted. git-svn-id: svn://kolibrios.org@133 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -138,8 +138,7 @@ new_start_application_floppy:
|
||||
jnz .cleanfailed
|
||||
|
||||
call get_app_params ;parse header fields
|
||||
test esi, esi
|
||||
jz .cleanfailed
|
||||
jc .cleanfailed
|
||||
|
||||
mov eax,[new_process_place]
|
||||
inc ecx ; -0x1E = no memory
|
||||
@@ -320,8 +319,7 @@ new_start_application_fl:
|
||||
jnz .cleanfailed
|
||||
|
||||
call get_app_params ;parse header fields
|
||||
test esi,esi
|
||||
jz .cleanfailed
|
||||
jc .cleanfailed
|
||||
|
||||
mov eax,[new_process_place]
|
||||
inc ecx ; -0x1E = no memory
|
||||
@@ -1301,8 +1299,7 @@ new_start_application_hd:
|
||||
rep movsd ;copy first block to 0x90000 address for get_app_params function
|
||||
call get_app_params
|
||||
mov ecx, -0x1F ; not Menuet/Kolibri executable
|
||||
test esi,esi
|
||||
jz .cleanfailed
|
||||
jc .cleanfailed
|
||||
|
||||
mov eax,[new_process_place]
|
||||
inc ecx ; -0x1E = no memory
|
||||
@@ -1536,8 +1533,12 @@ fs_execute:
|
||||
jnz .cleanfailed
|
||||
call get_app_params
|
||||
mov ecx, -0x1F
|
||||
test esi, esi
|
||||
jz .cleanfailed
|
||||
jc .cleanfailed
|
||||
; sanity check - because we will load all file,
|
||||
; file size must be not greater than memory size
|
||||
mov eax, [esp+8+36]
|
||||
cmp [app_mem], eax
|
||||
jb .cleanfailed
|
||||
|
||||
mov eax, [new_process_place]
|
||||
inc ecx ; -0x1E = no memory
|
||||
|
@@ -614,6 +614,12 @@ get_app_params:
|
||||
mov [app_i_end],eax
|
||||
mov eax,[0x90000+20]
|
||||
mov [app_mem],eax
|
||||
; \begin{diamond}[20.08.2006]
|
||||
; sanity check (functions 19,58 load app_i_end bytes and that must
|
||||
; fit in allocated memory to prevent kernel faults)
|
||||
cmp eax,[app_i_end]
|
||||
jb no_01_header
|
||||
; \end{diamond}[20.08.2006]
|
||||
shr eax,1
|
||||
sub eax,0x10
|
||||
mov [app_esp],eax
|
||||
@@ -622,7 +628,7 @@ get_app_params:
|
||||
mov [app_i_icon],dword 0
|
||||
|
||||
pop eax
|
||||
mov esi,1
|
||||
clc
|
||||
ret
|
||||
|
||||
no_00_header:
|
||||
@@ -637,6 +643,10 @@ get_app_params:
|
||||
mov [app_i_end],eax
|
||||
mov eax,[0x90000+20]
|
||||
mov [app_mem],eax
|
||||
; \begin{diamond}[20.08.2006]
|
||||
cmp eax,[app_i_end]
|
||||
jb no_01_header
|
||||
; \end{diamond}[20.08.2006]
|
||||
mov eax,[0x90000+24]
|
||||
mov [app_esp],eax
|
||||
mov eax,[0x90000+28]
|
||||
@@ -645,13 +655,13 @@ get_app_params:
|
||||
mov [app_i_icon],eax
|
||||
|
||||
pop eax
|
||||
mov esi,1
|
||||
clc
|
||||
ret
|
||||
|
||||
no_01_header:
|
||||
|
||||
pop eax
|
||||
mov esi,0
|
||||
stc
|
||||
ret
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user