PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
ACPI_EVAL_INPUT_BUFFER_SIMPLE_INTEGER *SimpleInt;
ACPI_EVAL_INPUT_BUFFER_SIMPLE_STRING *SimpleStr;
+ CHAR MethodName[5];
if (IrpSp->Parameters.DeviceIoControl.InputBufferLength < sizeof(ULONG))
return STATUS_INVALID_PARAMETER;
ParamList.Count = 1;
- ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'IPCA');
+ ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'OpcA');
if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
ParamList.Pointer[0].Type = ACPI_TYPE_INTEGER;
ParamList.Count = 1;
- ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'IPCA');
+ ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'OpcA');
if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
ParamList.Pointer[0].String.Pointer = (CHAR*)SimpleStr->String;
return STATUS_NOT_IMPLEMENTED;
}
+ RtlCopyMemory(MethodName,
+ EvalInputBuff->MethodName,
+ sizeof(EvalInputBuff->MethodName));
+ MethodName[4] = ANSI_NULL;
Status = AcpiEvaluateObject(DeviceData->AcpiHandle,
- (CHAR*)EvalInputBuff->MethodName,
+ MethodName,
&ParamList,
&RetBuff);
if (ParamList.Count != 0)
- ExFreePoolWithTag(ParamList.Pointer, 'IPCA');
+ ExFreePoolWithTag(ParamList.Pointer, 'OpcA');
if (ACPI_SUCCESS(Status))
{
ExtraParamLength = 0;
OutputBuf = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
- ExtraParamLength, 'IPCA');
+ ExtraParamLength, 'BpcA');
if (!OutputBuf) return STATUS_INSUFFICIENT_RESOURCES;
OutputBuf->Signature = ACPI_EVAL_OUTPUT_BUFFER_SIGNATURE;
RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, OutputBuf, sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
ExtraParamLength);
Irp->IoStatus.Information = sizeof(ACPI_EVAL_OUTPUT_BUFFER) + ExtraParamLength;
- ExFreePoolWithTag(OutputBuf, 'IPCA');
+ ExFreePoolWithTag(OutputBuf, 'BpcA');
return STATUS_SUCCESS;
}
else
{
- ExFreePoolWithTag(OutputBuf, 'IPCA');
+ ExFreePoolWithTag(OutputBuf, 'BpcA');
return STATUS_BUFFER_TOO_SMALL;
}
}