summaryrefslogtreecommitdiff
path: root/source/components/parser/psloop.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2026-05-11 21:41:03 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2026-05-11 21:41:03 +0000
commit69ae37302ee98839857791a261546e19d078cdb8 (patch)
treea783420e7d05aca39140987cdcba343646f4cac9 /source/components/parser/psloop.c
parent5cab380e2a2644aaa920b93f1580a1cfc803a8de (diff)
Diffstat (limited to 'source/components/parser/psloop.c')
-rw-r--r--source/components/parser/psloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c
index d46eb6aff46a..58719d974408 100644
--- a/source/components/parser/psloop.c
+++ b/source/components/parser/psloop.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -566,7 +566,8 @@ AcpiPsParseLoop (
WalkState->Aml = ParserState->Aml;
ACPI_ERROR ((AE_INFO, "Skipping While/If block"));
- if (*WalkState->Aml == AML_ELSE_OP)
+ if ((WalkState->Aml < ParserState->AmlEnd) &&
+ (*WalkState->Aml == AML_ELSE_OP))
{
ACPI_ERROR ((AE_INFO, "Skipping Else block"));
WalkState->ParserState.Aml = WalkState->Aml + 1;