Re: [PATCH v1 2/6] DynamicTablesPkg: DynamicPlatRepoLib: Fix incorrect dereferencing

Sami Mujawar

Hi Kun,

Thank you for this fix.

This patch looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@...>


Sami Mujawar

On 19/07/2022 01:22 am, Kun Qin wrote:

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@...>
Cc: Alexei Fedorov <Alexei.Fedorov@...>

Co-authored-by: Joe Lopez <joelopez@...>
Signed-off-by: Kun Qin <kuqin12@...>
DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
index 80d0aa17bc1a..84e4bb7e3bc8 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;



Join to automatically receive all group messages.