mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CComponentsForm: prevent wrong id parameter if item size out of range
Origin commit data
------------------
Branch: ni/coolstream
Commit: d72603665c
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-11-14 (Fri, 14 Nov 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
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