aboutsummaryrefslogtreecommitdiff
path: root/hw/cec.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-16 15:49:35 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-16 15:49:56 +1100
commit4d5e0d83129c302a39036102fb04ab598ec92c1b (patch)
tree0b3aee86ef79b68f9be20d4c58f13c873fc9e6d6 /hw/cec.c
parent168b71461d7706724ef2a6d921bc1460c8c3a20a (diff)
downloadskiboot-4d5e0d83129c302a39036102fb04ab598ec92c1b.zip
skiboot-4d5e0d83129c302a39036102fb04ab598ec92c1b.tar.gz
skiboot-4d5e0d83129c302a39036102fb04ab598ec92c1b.tar.bz2
assert cec_register(hub) hub_id is < MAX_IO_HUBS
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/cec.c')
-rw-r--r--hw/cec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/cec.c b/hw/cec.c
index 6c0fea8..23d6362 100644
--- a/hw/cec.c
+++ b/hw/cec.c
@@ -37,6 +37,7 @@ struct io_hub *cec_get_hub_by_id(uint32_t hub_id)
void cec_register(struct io_hub *hub)
{
+ assert(hub->hub_id < MAX_IO_HUBS);
cec_iohubs[hub->hub_id] = hub;
}