From fd93e76b97b93a059e916f4ea85e2262d0072329 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 4 Dec 2012 18:55:29 +0400 Subject: [PATCH] gui/cam_menu.cpp: workaround for possible wrong CI menu item count from libcs Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/108913b65dd6b7d7818570541f158d8b4d850348 Author: [CST] Focus Date: 2012-12-04 (Tue, 04 Dec 2012) --- src/gui/cam_menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 34071faec..7a8317d4d 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -332,7 +332,7 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(sptr, strlen(sptr), 0).c_str(), false)); } } - for(i = 0; i < pMenu->choice_nb; i++) { + for(i = 0; (i < pMenu->choice_nb) && (i < MAX_MMI_ITEMS); i++) { snprintf(cnt, sizeof(cnt), "%d", i); if(sublevel) menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(pMenu->choice_item[i], strlen(pMenu->choice_item[i]), 0).c_str(), true, NULL, selector, cnt));