summaryrefslogtreecommitdiffstats
path: root/source/components/debugger/dbnames.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/debugger/dbnames.c')
-rw-r--r--source/components/debugger/dbnames.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c
index e3c6d71..c071289 100644
--- a/source/components/debugger/dbnames.c
+++ b/source/components/debugger/dbnames.c
@@ -171,8 +171,7 @@ AcpiDbSetScope (
goto ErrorExit;
}
- ACPI_STRCPY (AcpiGbl_DbScopeBuf, Name);
- ACPI_STRCAT (AcpiGbl_DbScopeBuf, "\\");
+ AcpiGbl_DbScopeBuf[0] = 0;
}
else
{
@@ -184,9 +183,22 @@ AcpiDbSetScope (
{
goto ErrorExit;
}
+ }
+
+ /* Build the final pathname */
+
+ if (AcpiUtSafeStrcat (AcpiGbl_DbScopeBuf, sizeof (AcpiGbl_DbScopeBuf),
+ Name))
+ {
+ Status = AE_BUFFER_OVERFLOW;
+ goto ErrorExit;
+ }
- ACPI_STRCAT (AcpiGbl_DbScopeBuf, Name);
- ACPI_STRCAT (AcpiGbl_DbScopeBuf, "\\");
+ if (AcpiUtSafeStrcat (AcpiGbl_DbScopeBuf, sizeof (AcpiGbl_DbScopeBuf),
+ "\\"))
+ {
+ Status = AE_BUFFER_OVERFLOW;
+ goto ErrorExit;
}
AcpiGbl_DbScopeNode = Node;
OpenPOWER on IntegriCloud