summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg
diff options
context:
space:
mode:
authorKun Qin <kuqin12@gmail.com>2022-06-30 17:38:50 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-09-01 10:27:02 +0000
commitb18c0905ee4c244d881ec74edbbcbdf424c8c875 (patch)
tree940f4d8d15633c4c76d21560606df8544b8d81f3 /DynamicTablesPkg
parent20810546369603890cf428cf381deb0b0aa44c5c (diff)
downloadedk2-b18c0905ee4c244d881ec74edbbcbdf424c8c875.tar.gz
edk2-b18c0905ee4c244d881ec74edbbcbdf424c8c875.tar.bz2
edk2-b18c0905ee4c244d881ec74edbbcbdf424c8c875.zip
DynamicTablesPkg: DynamicPlatRepoLib: Fix incorrect dereferencing
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3996 The content of token should be derived from the data section of the `CmObject` instead of the object itself. This change fixed the issue by dereferencing the token value from the data buffer of input CmObject. Cc: Sami Mujawar <Sami.Mujawar@arm.com> Cc: Alexei Fedorov <Alexei.Fedorov@arm.com> Co-authored-by: Joe Lopez <joelopez@microsoft.com> Signed-off-by: Kun Qin <kuqin12@gmail.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Tested-by: Sami Mujawar <sami.mujawar@arm.com>
Diffstat (limited to 'DynamicTablesPkg')
-rw-r--r--DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
index 80d0aa17bc..84e4bb7e3b 100644
--- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
+++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
@@ -60,7 +60,7 @@ TokenFixerItsGroup (
)
{
ASSERT (CmObject != NULL);
- ((CM_ARM_ITS_GROUP_NODE *)CmObject)->Token = Token;
+ ((CM_ARM_ITS_GROUP_NODE *)CmObject->Data)->Token = Token;
return EFI_SUCCESS;
}