mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
fix possible segfault if selected > items.size()
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1920 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: d8bfc3d047
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-11-27 (Sun, 27 Nov 2011)
Origin message was:
------------------
-fix possible segfault if selected > items.size()
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1920 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -494,7 +494,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if(hasItem() && selected >= 0)
|
if(hasItem() && selected >= 0 && (int)items.size() > selected )
|
||||||
bAllowRepeatLR = items[selected]->can_arrow;
|
bAllowRepeatLR = items[selected]->can_arrow;
|
||||||
|
|
||||||
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, bAllowRepeatLR);
|
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, bAllowRepeatLR);
|
||||||
@@ -657,7 +657,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
|||||||
case (CRCInput::RC_right):
|
case (CRCInput::RC_right):
|
||||||
case (CRCInput::RC_ok):
|
case (CRCInput::RC_ok):
|
||||||
{
|
{
|
||||||
if(hasItem() && selected > -1) {
|
if(hasItem() && selected > -1 && (int)items.size() > selected) {
|
||||||
//exec this item...
|
//exec this item...
|
||||||
CMenuItem* item = items[selected];
|
CMenuItem* item = items[selected];
|
||||||
item->msg = msg;
|
item->msg = msg;
|
||||||
|
Reference in New Issue
Block a user