mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
- Fixed a bug in IsoSearchDirectoryBufferForFile. Compare the offset first, so we don't access invalid memory.
svn path=/trunk/; revision=9456
This commit is contained in:
parent
ce81c53f81
commit
1c9e1c3a8b
1 changed files with 3 additions and 3 deletions
|
@ -88,6 +88,9 @@ static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 Directory
|
|||
Record = (PDIR_RECORD)(DirectoryBuffer + Offset);
|
||||
}
|
||||
|
||||
if (Offset >= DirectoryLength)
|
||||
return FALSE;
|
||||
|
||||
if (Record->FileIdLength == 1 && Record->FileId[0] == 0)
|
||||
{
|
||||
DbgPrint((DPRINT_FILESYSTEM, "Name '.'\n"));
|
||||
|
@ -115,9 +118,6 @@ static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 Directory
|
|||
|
||||
}
|
||||
|
||||
if (Offset >= DirectoryLength)
|
||||
return FALSE;
|
||||
|
||||
RtlZeroMemory(Name, 32 * sizeof(UCHAR));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue