This commit is contained in:
Pavel 2025-06-25 04:13:27 +03:00
parent 254f194933
commit 32d06bc69a
3 changed files with 8 additions and 8 deletions

View File

@ -285,7 +285,7 @@ begin
ofs:=offset^;
if (ofs > -1) and (size <= $5000000000 - ofs) then
if (ofs > -1) and (size <= max_valid_dmem - ofs) then
begin
//
end else

View File

@ -216,7 +216,7 @@ begin
Result:=0;
addr^:=0;
if (((phaddr shr 36) > 4) or ((max_valid - phaddr) < length)) then
if (((phaddr shr 36) > 4) or ((max_valid_dmem - phaddr) < length)) then
begin
Exit(EACCES);
end;

View File

@ -30,7 +30,7 @@ Const
SCE_KERNEL_UC_GARLIC_VOLATILE = 8;
SCE_KERNEL_UC_GARLIC_NONVOLATILE = 9;
max_valid=QWORD($5000000000);
max_valid_dmem=QWORD($5000000000);
type
pp_dmem_map_entry=^p_dmem_map_entry;
@ -620,10 +620,10 @@ begin
if (align<PAGE_SIZE) then align:=PAGE_SIZE;
start:=(not (start shr 63)) and start;
if (start>max_valid) then start:=max_valid;
if (start>max_valid_dmem) then start:=max_valid_dmem;
__end:=(not (__end shr 63)) and __end;
if (__end>max_valid) then __end:=max_valid;
if (__end>max_valid_dmem) then __end:=max_valid_dmem;
start:=AlignUp(start,align);
@ -863,7 +863,7 @@ begin
start:=(not (start shr 63)) and start;
if (__end>max_valid) then __end:=max_valid;
if (__end>max_valid_dmem) then __end:=max_valid_dmem;
if (__end <= start) then
begin
@ -1001,12 +1001,12 @@ begin
Exit(EINVAL);
end;
if (Int64(start) > Int64($4fffffffff)) then
if (Int64(start) >= max_valid_dmem) then
begin
Exit(0);
end;
offset:=QWORD($5000000000) - start;
offset:=max_valid_dmem - start;
if (Int64(len) < Int64(offset)) then
begin