From c0e2cf9b53a9b0029877e5f1b1a48ac66d139085 Mon Sep 17 00:00:00 2001 From: Robert Moore Date: Tue, 23 Apr 2013 13:38:27 -0700 Subject: [PATCH] Debugger: Fix strlen +1 issue with History command. Allocate strlen +1 for history buffers. --- source/components/debugger/dbhistry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/components/debugger/dbhistry.c b/source/components/debugger/dbhistry.c index 70401a7ea..42dab6ff4 100644 --- a/source/components/debugger/dbhistry.c +++ b/source/components/debugger/dbhistry.c @@ -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,