Dereferencing pMemTableSize in debug statement displays bad values when
it is set to NULL.  Display the actual table size value instead.

TEST=Build and run on Galileo Gen2

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy <[email protected]>
---
 CorebootModulePkg/Library/CbParseLib/CbParseLib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c 
b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c
index de6a5f7..e7f08c2 100644
--- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c
+++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c
@@ -216,7 +216,8 @@ FindCbMemTable (
         *pMemTableSize = Entries[Idx].size;
       }
 
-      DEBUG ((EFI_D_INFO, "Find CbMemTable Id 0x%x, base %p, size 0x%x\n", 
TableId, *pMemTable, *pMemTableSize));
+      DEBUG ((EFI_D_INFO, "Find CbMemTable Id 0x%x, base %p, size 0x%x\n",
+        TableId, *pMemTable, Entries[Idx].size));
       return RETURN_SUCCESS;
     }
   }
-- 
1.9.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to