mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[NTOS:IO]
- Do not dereference an unsafe ObjectAttributes pointer in IoCreateFile. Spotted by Aleksandar Andrejevic (I'm removing the OriginalAttributes assignment completely because it's never used, and it generally makes no sense to copy this. ObOpenObjectByName already takes care of everything in attributes) CORE-7167 svn path=/trunk/; revision=59134
This commit is contained in:
parent
6dfd719ee8
commit
6c59bd48c4
1 changed files with 1 additions and 2 deletions
|
@ -1761,7 +1761,7 @@ IoCreateFile(OUT PHANDLE FileHandle,
|
|||
SystemEaBuffer = ExAllocatePoolWithTag(NonPagedPool,
|
||||
EaLength,
|
||||
TAG_EA);
|
||||
if(!SystemEaBuffer)
|
||||
if (!SystemEaBuffer)
|
||||
{
|
||||
_SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
|
||||
}
|
||||
|
@ -1840,7 +1840,6 @@ IoCreateFile(OUT PHANDLE FileHandle,
|
|||
RtlZeroMemory(&OpenPacket, sizeof(OPEN_PACKET));
|
||||
OpenPacket.Type = IO_TYPE_OPEN_PACKET;
|
||||
OpenPacket.Size = sizeof(OPEN_PACKET);
|
||||
OpenPacket.OriginalAttributes = *ObjectAttributes;
|
||||
OpenPacket.AllocationSize = SafeAllocationSize;
|
||||
OpenPacket.CreateOptions = CreateOptions;
|
||||
OpenPacket.FileAttributes = (USHORT)FileAttributes;
|
||||
|
|
Loading…
Reference in a new issue