mirror of
https://github.com/acpica/acpica/
synced 2025-02-12 11:34:42 +03:00
Copy input string to a local prior to uppercasing. prevents fault if string is in the code seg
This commit is contained in:
parent
14d436d59c
commit
1968975baa
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbexec - debugger control method execution
|
||||
* $Revision: 1.71 $
|
||||
* $Revision: 1.72 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -399,6 +399,7 @@ AcpiDbExecute (
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_BUFFER ReturnObj;
|
||||
char *NameString;
|
||||
|
||||
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
@ -419,8 +420,15 @@ AcpiDbExecute (
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiUtStrupr (Name);
|
||||
AcpiGbl_DbMethodInfo.Name = Name;
|
||||
NameString = ACPI_MEM_ALLOCATE (ACPI_STRLEN (Name) + 1);
|
||||
if (!NameString)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ACPI_STRCPY (NameString, Name);
|
||||
AcpiUtStrupr (NameString);
|
||||
AcpiGbl_DbMethodInfo.Name = NameString;
|
||||
AcpiGbl_DbMethodInfo.Args = Args;
|
||||
AcpiGbl_DbMethodInfo.Flags = Flags;
|
||||
|
||||
@ -429,6 +437,7 @@ AcpiDbExecute (
|
||||
|
||||
AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
|
||||
Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
|
||||
ACPI_MEM_FREE (NameString);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user