Kaydet (Commit) 893298e7 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

avoid out of bounds access

Change-Id: I4c7ddf2fcabc231b7250306b4a9255fab1a9ef7c
üst ad21f8ec
......@@ -529,9 +529,10 @@ int RemoteFilesDialog::GetSelectedServicePos()
if( m_aServices.empty() )
return -1;
while( nPos < ( int )m_aServices.size() )
int nServices = static_cast<int>(m_aServices.size());
while( nPos < nServices )
{
while( m_aServices[nPos]->IsLocal() )
while( (nPos < nServices) && m_aServices[nPos]->IsLocal() )
nPos++;
i++;
if( i == nSelected )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment