Permalink
Browse files

Extend out of range check for iNewChannelNumber

This prevents a crash if someone would try to move a channel to number 0
  • Loading branch information...
1 parent a7559a4 commit 4b1a0e70df6cf91b22d33bc2168b282f28a79a91 @mikrohard committed Oct 29, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 xbmc/pvr/channels/PVRChannelGroup.cpp
@@ -190,6 +190,9 @@ bool CPVRChannelGroup::MoveChannel(unsigned int iOldChannelNumber, unsigned int
return bReturn;
/* new channel number out of range */
+ if (iNewChannelNumber < 1)
+ return bReturn;
+
if (iNewChannelNumber > m_members.size())
iNewChannelNumber = m_members.size();

0 comments on commit 4b1a0e7

Please sign in to comment.