[coreboot-gerrit] Change in coreboot[master]: soc/intel/apollolake: Fix Coverity Error
Hannah Williams (Code Review)
gerrit at coreboot.org
Thu Aug 3 02:42:04 CEST 2017
Hannah Williams has uploaded this change for review. ( https://review.coreboot.org/20867
Change subject: soc/intel/apollolake: Fix Coverity Error
......................................................................
soc/intel/apollolake: Fix Coverity Error
Change-Id: Ib7e43b195357c723e1ae51f609a8b07ad984380a
Signed-off-by: Hannah Williams <hannah.williams at intel.com>
---
M src/soc/intel/apollolake/cse.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/20867/1
diff --git a/src/soc/intel/apollolake/cse.c b/src/soc/intel/apollolake/cse.c
index 515d32b..3e1792c 100644
--- a/src/soc/intel/apollolake/cse.c
+++ b/src/soc/intel/apollolake/cse.c
@@ -92,6 +92,10 @@
return 0;
}
+ if (strnlen(path, sizeof(msg.file_name)) >= sizeof(msg.file_name)) {
+ printk(BIOS_ERR, "path too big for msg.file_name buffer\n");
+ return 0;
+ }
strncpy(msg.file_name, path, sizeof(msg.file_name));
msg.mkhi_hdr.fields.group_id = MKHI_GROUP_ID_MCA;
msg.mkhi_hdr.fields.command = READ_FILE;
--
To view, visit https://review.coreboot.org/20867
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7e43b195357c723e1ae51f609a8b07ad984380a
Gerrit-Change-Number: 20867
Gerrit-PatchSet: 1
Gerrit-Owner: Hannah Williams <hannah.williams at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170803/0fd71756/attachment-0001.html>
More information about the coreboot-gerrit
mailing list