[coreboot-gerrit] Change in coreboot[master]: soc/intel/common/block/pcr: Add NULL pointer check in pcr_execute_sid...

Subrata Banik (Code Review) gerrit at coreboot.org
Sat Oct 6 11:01:41 CEST 2018


Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/28949


Change subject: soc/intel/common/block/pcr: Add NULL pointer check in pcr_execute_sideband_msg()
......................................................................

soc/intel/common/block/pcr: Add NULL pointer check in pcr_execute_sideband_msg()

This patch to fix KW issue due to msg, data and response pointers NULL
check fail.

Change-Id: I39324514079f240ba1683a04e579de85485299bf
Signed-off-by: Subrata Banik <subrata.banik at intel.com>
---
M src/soc/intel/common/block/pcr/pcr.c
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/28949/1

diff --git a/src/soc/intel/common/block/pcr/pcr.c b/src/soc/intel/common/block/pcr/pcr.c
index b8d798f..024059a 100644
--- a/src/soc/intel/common/block/pcr/pcr.c
+++ b/src/soc/intel/common/block/pcr/pcr.c
@@ -263,7 +263,10 @@
 	uint16_t sbi_status;
 	uint16_t sbi_rid;
 
-	assert(msg && data && response);
+	if (!msg || !data || !response) {
+		die("Pointer msg/ data/ response checked for NULL Fail!");
+		return -1;
+	}
 
 	switch (msg->opcode) {
 		case MEM_READ:

-- 
To view, visit https://review.coreboot.org/28949
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I39324514079f240ba1683a04e579de85485299bf
Gerrit-Change-Number: 28949
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181006/3bf09229/attachment.html>


More information about the coreboot-gerrit mailing list