From 0d5f467d6a0ba852ea3aad68663cbcbd43300fd4 Mon Sep 17 00:00:00 2001 From: void0red <30990023+void0red@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:59:27 +0800 Subject: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in AcpiDbDisplayObjects ACPI_ALLOCATE_ZEROED may fails, ObjectInfo might be null and will cause null pointer dereference later. --- source/components/debugger/dbnames.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index ae4a10ca5..084a25287 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -883,6 +883,9 @@ AcpiDbDisplayObjects ( if (!ObjTypeArg) { ObjectInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_OBJECT_INFO)); + + if (!ObjectInfo) + return (AE_NO_MEMORY); /* Walk the namespace from the root */ -- cgit v1.2.1