- 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:
Filip Navara 2004-05-21 20:06:09 +00:00
parent ce81c53f81
commit 1c9e1c3a8b

View file

@ -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));
}