mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:35:40 +00:00
Fix IoGetDeviceProperty, which should never return STATUS_BUFFER_OVERFLOW, but STATUS_BUFFER_TOO_SMALL
svn path=/trunk/; revision=18506
This commit is contained in:
parent
703d635153
commit
39b4f74f8c
1 changed files with 4 additions and 7 deletions
|
@ -325,13 +325,10 @@ IoGetDeviceProperty(
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ExFreePool(ValueInformation);
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (ValueInformation->DataLength > BufferLength)
|
||||
{
|
||||
ExFreePool(ValueInformation);
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
if (Status == STATUS_BUFFER_OVERFLOW)
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
else
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* FIXME: Verify the value (NULL-terminated, correct format). */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue