mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-24 15:46:49 +03:00
kernel: set maximum length of a stored application path name to 1023 bytes
git-svn-id: svn://kolibrios.org@6338 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8bb7273e0f
commit
22e9386a23
@ -870,23 +870,35 @@ common_app_entry:
|
||||
.copy_full_path:
|
||||
mov esi, [current_slot]
|
||||
mov esi, [esi+APPDATA.cur_dir]
|
||||
mov ebx, 1023
|
||||
mov al, '/'
|
||||
stosb
|
||||
@@:
|
||||
|
||||
.copy_path:
|
||||
dec ebx
|
||||
jz .finish_path
|
||||
lodsb
|
||||
stosb
|
||||
test al, al
|
||||
jnz @B
|
||||
jnz .copy_path
|
||||
mov byte [edi-1], '/'
|
||||
|
||||
cmp ecx, ebx
|
||||
jbe @F
|
||||
mov ecx, ebx
|
||||
@@:
|
||||
lea esi, [ebp+sizeof.APP_HDR]
|
||||
xor eax, eax
|
||||
rep movsb
|
||||
stosb
|
||||
jmp .check_cmdline
|
||||
|
||||
.copy_filename:
|
||||
.finish_path:
|
||||
xor eax, eax
|
||||
stosb
|
||||
jmp .check_cmdline
|
||||
|
||||
.copy_filename:
|
||||
cmp byte [esi], '/'
|
||||
jne .copy_full_path
|
||||
|
||||
|
@ -135,6 +135,19 @@ file_system_lfn:
|
||||
lodsb
|
||||
@@:
|
||||
lea ebp, [esi-1]
|
||||
if 0
|
||||
cmp [ebx], dword 0
|
||||
jne @F
|
||||
DEBUGF 1,'read file %s\n',ebp
|
||||
jmp .1
|
||||
@@:
|
||||
cmp [ebx], dword 5
|
||||
jne @F
|
||||
DEBUGF 1,'get file attributes %s\n',ebp
|
||||
@@:
|
||||
.1:
|
||||
end if
|
||||
|
||||
cmp dword [ebx], 7
|
||||
jne @F
|
||||
mov edx, [ebx+4]
|
||||
|
Loading…
Reference in New Issue
Block a user