Attention is currently required from: Patrick Rudolph.
Patrick Rudolph would like Patrick Rudolph to review this change.
ich_descriptors: Fix debug print
Allow up nm to be qqual to ARRAY_SIZE(master_names).
The loop below makes sure that it doesn't access master_names
out of bounds.
Change-Id: Ib9276a6c29952487db6e60fb583942c0f24cd6ef
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
M ich_descriptors.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/00/78300/1
diff --git a/ich_descriptors.c b/ich_descriptors.c
index a2a99bd..4b440ed 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -493,9 +493,9 @@
const char *const master_names[] = {
"BIOS", "ME", "GbE", "unknown", "EC",
};
- if (nm >= (ssize_t)ARRAY_SIZE(master_names)) {
- msg_pdbg2("%s: number of masters too high (%d).\n", __func__,
- desc->content.NM + 1);
+
+ if (nm > (ssize_t)ARRAY_SIZE(master_names)) {
+ msg_pdbg2("%s: number of masters too high (%zd).\n", __func__, nm);
return;
}
To view, visit change 78300. To unsubscribe, or for help writing mail filters, visit settings.