From 0fd37efd3ec48f9a8532e2d71bb4b43888f375cf Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 07:25:56 +0000 Subject: Apply patch cve-2017-13693.patch patch_name: cve-2017-13693.patch present_in_specfile: true --- diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c index afba711..4a49460 100644 --- a/source/components/dispatcher/dsutils.c +++ b/source/components/dispatcher/dsutils.c @@ -761,6 +761,8 @@ AcpiDsCreateOperands ( ACPI_PARSE_OBJECT *Arguments[ACPI_OBJ_NUM_OPERANDS]; UINT32 ArgCount = 0; UINT32 Index = WalkState->NumOperands; + UINT32 PrevNumOperands = WalkState->NumOperands; + UINT32 NewNumOperands; UINT32 i; @@ -793,6 +795,7 @@ AcpiDsCreateOperands ( /* Create the interpreter arguments, in reverse order */ + NewNumOperands = Index; Index--; for (i = 0; i < ArgCount; i++) { @@ -820,7 +823,11 @@ Cleanup: * pop everything off of the operand stack and delete those * objects */ - AcpiDsObjStackPopAndDelete (ArgCount, WalkState); + WalkState->NumOperands = i; + AcpiDsObjStackPopAndDelete (NewNumOperands, WalkState); + + /* Restore operand count */ + WalkState->NumOperands = PrevNumOperands; ACPI_EXCEPTION ((AE_INFO, Status, "While creating Arg %u", Index)); return_ACPI_STATUS (Status);