mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[NTOSKRNL]
- Fix potential use-after-free CID 732509 - Fix buffer size in call to ObQueryNameString svn path=/trunk/; revision=64903
This commit is contained in:
parent
f42c9182f2
commit
86018d03c4
1 changed files with 3 additions and 4 deletions
|
@ -310,11 +310,9 @@ IopLogWorker(IN PVOID Parameter)
|
|||
/* We do, query its name */
|
||||
Status = ObQueryNameString(LogEntry->DeviceObject,
|
||||
ObjectNameInfo,
|
||||
sizeof(OBJECT_NAME_INFORMATION) +
|
||||
100 -
|
||||
DriverNameLength,
|
||||
sizeof(Buffer),
|
||||
&ReturnedLength);
|
||||
if ((!NT_SUCCESS(Status)) || !(ObjectNameInfo->Name.Length))
|
||||
if (!NT_SUCCESS(Status) || (ObjectNameInfo->Name.Length == 0))
|
||||
{
|
||||
/* Setup an empty name */
|
||||
ObjectNameInfo->Name.Length = 0;
|
||||
|
@ -371,6 +369,7 @@ IopLogWorker(IN PVOID Parameter)
|
|||
{
|
||||
ExFreePool(PoolObjectNameInfo);
|
||||
PoolObjectNameInfo = NULL;
|
||||
ObjectNameInfo = (POBJECT_NAME_INFORMATION)&Buffer;
|
||||
}
|
||||
|
||||
/* Go to the next string buffer position */
|
||||
|
|
Loading…
Reference in a new issue