mirror of https://github.com/red-prig/fpPS4.git
This commit is contained in:
parent
254f194933
commit
32d06bc69a
|
@ -285,7 +285,7 @@ begin
|
||||||
|
|
||||||
ofs:=offset^;
|
ofs:=offset^;
|
||||||
|
|
||||||
if (ofs > -1) and (size <= $5000000000 - ofs) then
|
if (ofs > -1) and (size <= max_valid_dmem - ofs) then
|
||||||
begin
|
begin
|
||||||
//
|
//
|
||||||
end else
|
end else
|
||||||
|
|
|
@ -216,7 +216,7 @@ begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
addr^:=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
|
begin
|
||||||
Exit(EACCES);
|
Exit(EACCES);
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -30,7 +30,7 @@ Const
|
||||||
SCE_KERNEL_UC_GARLIC_VOLATILE = 8;
|
SCE_KERNEL_UC_GARLIC_VOLATILE = 8;
|
||||||
SCE_KERNEL_UC_GARLIC_NONVOLATILE = 9;
|
SCE_KERNEL_UC_GARLIC_NONVOLATILE = 9;
|
||||||
|
|
||||||
max_valid=QWORD($5000000000);
|
max_valid_dmem=QWORD($5000000000);
|
||||||
|
|
||||||
type
|
type
|
||||||
pp_dmem_map_entry=^p_dmem_map_entry;
|
pp_dmem_map_entry=^p_dmem_map_entry;
|
||||||
|
@ -620,10 +620,10 @@ begin
|
||||||
if (align<PAGE_SIZE) then align:=PAGE_SIZE;
|
if (align<PAGE_SIZE) then align:=PAGE_SIZE;
|
||||||
|
|
||||||
start:=(not (start shr 63)) and start;
|
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;
|
__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);
|
start:=AlignUp(start,align);
|
||||||
|
|
||||||
|
@ -863,7 +863,7 @@ begin
|
||||||
|
|
||||||
start:=(not (start shr 63)) and start;
|
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
|
if (__end <= start) then
|
||||||
begin
|
begin
|
||||||
|
@ -1001,12 +1001,12 @@ begin
|
||||||
Exit(EINVAL);
|
Exit(EINVAL);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (Int64(start) > Int64($4fffffffff)) then
|
if (Int64(start) >= max_valid_dmem) then
|
||||||
begin
|
begin
|
||||||
Exit(0);
|
Exit(0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
offset:=QWORD($5000000000) - start;
|
offset:=max_valid_dmem - start;
|
||||||
|
|
||||||
if (Int64(len) < Int64(offset)) then
|
if (Int64(len) < Int64(offset)) then
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue