mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
CComponentsForm: prevent wrong id parameter if item size out of range
This commit is contained in:
@@ -250,6 +250,11 @@ int CComponentsForm::genIndex()
|
||||
|
||||
CComponentsItem* CComponentsForm::getCCItem(const uint& cc_item_id)
|
||||
{
|
||||
if (cc_item_id >= size()){
|
||||
dprintf(DEBUG_NORMAL, "[CComponentsForm] [%s - %d] Error: parameter cc_item_id = %u, out of range (size = %u)...\n", __func__, __LINE__, cc_item_id, size());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (v_cc_items[cc_item_id])
|
||||
return v_cc_items[cc_item_id];
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user