src/gui/widget/menue.cpp fix possible heap-buffer-overflow

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5be8af9890
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-07-21 (Thu, 21 Jul 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2016-07-21 15:38:34 +02:00
parent 11170b75bf
commit ffd6e7fc7a

View File

@@ -1311,9 +1311,9 @@ void CMenuWidget::paintItems()
//Item not currently on screen
if (selected >= 0)
{
while (selected < page_start[current_page])
while (current_page > 0 && selected < page_start[current_page])
current_page--;
while (selected >= page_start[current_page + 1])
while (current_page+1 < page_start.size() && selected >= page_start[current_page + 1])
current_page++;
}