mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 21:49:06 +02:00
* fix potential range check error in cfileutl, should resolve #19405
git-svn-id: trunk@17660 -
This commit is contained in:
parent
93e53e1990
commit
33de8c8336
@ -52,7 +52,7 @@ interface
|
|||||||
FDirectoryEntries : TFPHashList;
|
FDirectoryEntries : TFPHashList;
|
||||||
FCached : Boolean;
|
FCached : Boolean;
|
||||||
procedure FreeDirectoryEntries;
|
procedure FreeDirectoryEntries;
|
||||||
function GetItemAttr(const AName: TCmdStr): byte;
|
function GetItemAttr(const AName: TCmdStr): longint;
|
||||||
function TryUseCache: boolean;
|
function TryUseCache: boolean;
|
||||||
procedure ForceUseCache;
|
procedure ForceUseCache;
|
||||||
procedure Reload;
|
procedure Reload;
|
||||||
@ -236,7 +236,7 @@ end;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TCachedDirectory.GetItemAttr(const AName: TCmdStr): byte;
|
function TCachedDirectory.GetItemAttr(const AName: TCmdStr): longint;
|
||||||
var
|
var
|
||||||
entry: PCachedDirectoryEntry;
|
entry: PCachedDirectoryEntry;
|
||||||
begin
|
begin
|
||||||
@ -523,8 +523,8 @@ end;
|
|||||||
if (length(s)>0) and (s[1] in AllowDirectorySeparators) then
|
if (length(s)>0) and (s[1] in AllowDirectorySeparators) then
|
||||||
result:=true;
|
result:=true;
|
||||||
{$elseif defined(amiga) or defined(morphos)}
|
{$elseif defined(amiga) or defined(morphos)}
|
||||||
(* An Amiga path is absolute, if it has a volume/device name in it (contains ":"),
|
(* An Amiga path is absolute, if it has a volume/device name in it (contains ":"),
|
||||||
otherwise it's always a relative path, no matter if it starts with a directory
|
otherwise it's always a relative path, no matter if it starts with a directory
|
||||||
separator or not. (KB) *)
|
separator or not. (KB) *)
|
||||||
if (length(s)>0) and (Pos(':',s) <> 0) then
|
if (length(s)>0) and (Pos(':',s) <> 0) then
|
||||||
result:=true;
|
result:=true;
|
||||||
|
Loading…
Reference in New Issue
Block a user