mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 05:28:14 +00:00
[ACPI]
- Ensure null termination of the method name passed to AcpiEvaluateObject in Bus_PDO_EvalMethod. Spotted by ReactCoder. CORE-13068 #resolve svn path=/trunk/; revision=74300
This commit is contained in:
parent
8acb3b7995
commit
0431372bc4
1 changed files with 6 additions and 1 deletions
|
@ -17,6 +17,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
|
||||||
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
||||||
ACPI_EVAL_INPUT_BUFFER_SIMPLE_INTEGER *SimpleInt;
|
ACPI_EVAL_INPUT_BUFFER_SIMPLE_INTEGER *SimpleInt;
|
||||||
ACPI_EVAL_INPUT_BUFFER_SIMPLE_STRING *SimpleStr;
|
ACPI_EVAL_INPUT_BUFFER_SIMPLE_STRING *SimpleStr;
|
||||||
|
CHAR MethodName[5];
|
||||||
|
|
||||||
if (IrpSp->Parameters.DeviceIoControl.InputBufferLength < sizeof(ULONG))
|
if (IrpSp->Parameters.DeviceIoControl.InputBufferLength < sizeof(ULONG))
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
@ -67,8 +68,12 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RtlCopyMemory(MethodName,
|
||||||
|
EvalInputBuff->MethodName,
|
||||||
|
sizeof(EvalInputBuff->MethodName));
|
||||||
|
MethodName[4] = ANSI_NULL;
|
||||||
Status = AcpiEvaluateObject(DeviceData->AcpiHandle,
|
Status = AcpiEvaluateObject(DeviceData->AcpiHandle,
|
||||||
(CHAR*)EvalInputBuff->MethodName,
|
MethodName,
|
||||||
&ParamList,
|
&ParamList,
|
||||||
&RetBuff);
|
&RetBuff);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue