[Skiboot] [PATCH 1/8] assert cec_register(hub) hub_id is < MAX_IO_HUBS
Stewart Smith
stewart at linux.vnet.ibm.com
Tue Nov 17 15:39:00 AEDT 2015
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
hw/cec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/cec.c b/hw/cec.c
index 6c0fea83bb39..23d6362dc5b0 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;
}
--
2.1.4
More information about the Skiboot
mailing list