summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/ReportStatusCodeRouter
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2020-04-09 05:45:28 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-04-21 02:20:51 +0000
commit05db94018bdd7c904efb6463884bd1ab30d5ccb7 (patch)
tree8d2e418290a5d9115f8c955e47ac4d63945660a3 /MdeModulePkg/Universal/ReportStatusCodeRouter
parent1a258c7703e587f85885099dd57236cb45af82f8 (diff)
downloadedk2-05db94018bdd7c904efb6463884bd1ab30d5ccb7.tar.gz
edk2-05db94018bdd7c904efb6463884bd1ab30d5ccb7.tar.bz2
edk2-05db94018bdd7c904efb6463884bd1ab30d5ccb7.zip
MdeModulePkg/ReportStatusCodeRouter: Take HeaderSize into Consideration
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2669 Updates ReportDispatcher() to take the size in the HeaderSize field in a EFI_STATUS_CODE_DATA element into account when walking the data buffer. This size will cause the header size to differ from the compiled sizeof header. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Kun Qin <Kun.Qin@microsoft.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/ReportStatusCodeRouter')
-rw-r--r--MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c
index 27939235dc..2037c2fad0 100644
--- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c
+++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c
@@ -65,7 +65,7 @@ RscHandlerNotification (
&RscData->Data
);
- Address += (sizeof (RSC_DATA_ENTRY) + RscData->Data.Size);
+ Address += (OFFSET_OF (RSC_DATA_ENTRY, Data) + RscData->Data.HeaderSize + RscData->Data.Size);
Address = ALIGN_VARIABLE (Address);
}
@@ -274,7 +274,7 @@ ReportDispatcher (
RscData = (RSC_DATA_ENTRY *) (UINTN) CallbackEntry->EndPointer;
CallbackEntry->EndPointer += sizeof (RSC_DATA_ENTRY);
if (Data != NULL) {
- CallbackEntry->EndPointer += Data->Size;
+ CallbackEntry->EndPointer += (Data->Size + Data->HeaderSize - sizeof (EFI_STATUS_CODE_DATA));
}
//