From b18c0905ee4c244d881ec74edbbcbdf424c8c875 Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Thu, 30 Jun 2022 17:38:50 -0700 Subject: 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 Cc: Alexei Fedorov Co-authored-by: Joe Lopez Signed-off-by: Kun Qin Reviewed-by: Sami Mujawar Reviewed-by: Pierre Gondois Tested-by: Sami Mujawar --- DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DynamicTablesPkg') 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; } -- cgit v1.2.3