Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes a "read 4 bytes before allocated block of 28 bytes" error found by

valgrind.  With a reverse_iterator, check that we haven't hit end() before 
checking the value of the iterator as on the last check, the value is not
actually in the list.



git-svn-id: http://svn.mythtv.org/svn/trunk@27271 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information...
commit bde9ee332b12f2bf25e3217fbdd1b598669a9866 1 parent 24f8fcf
@Beirdo Beirdo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mythtv/libs/libmyth/audiooutputsettings.cpp
View
2  mythtv/libs/libmyth/audiooutputsettings.cpp
@@ -239,7 +239,7 @@ void AudioOutputSettings::SetBestSupportedChannels(int channels)
vector<int>::reverse_iterator it;
for (it = m_channels.rbegin();
- *it >= channels && it < m_channels.rend();
+ it != m_channels.rend() && *it >= channels;
it++)
m_channels.pop_back();
m_channels.push_back(channels);
Please sign in to comment.
Something went wrong with that request. Please try again.