From 597f10d92026034cd3b79e9ecfeea91bd6493a3b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 4 Jan 2016 13:50:36 +0100 Subject: [PATCH] src/gui/channellist.cpp fix possible segfault (heap-buffer-overflow) --- src/gui/channellist.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index bfa476dd6..89bfcc921 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1386,6 +1386,9 @@ int CChannelList::numericZap(int key) CZapitChannel* CChannelList::getPrevNextChannel(int key, unsigned int &sl) { + if(sl >= (*chanlist).size()) + sl = (*chanlist).size()-1; + CZapitChannel* channel = (*chanlist)[sl]; int bsize = bouquetList->Bouquets.size(); int bactive = bouquetList->getActiveBouquetNumber();