Debugger: Fix strlen +1 issue with History command.

Allocate strlen +1 for history buffers.
This commit is contained in:
Robert Moore 2013-04-23 13:38:27 -07:00
parent a9d8bd031d
commit c0e2cf9b53

View File

@ -175,13 +175,13 @@ AcpiDbAddToHistory (
AcpiOsFree (AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].
Command);
AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command =
AcpiOsAllocate (CmdLen);
AcpiOsAllocate (CmdLen + 1);
}
}
else
{
AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command =
AcpiOsAllocate (CmdLen);
AcpiOsAllocate (CmdLen + 1);
}
ACPI_STRCPY (AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command,