mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
controlapi.cpp: fix segfault if the bouquet number passed is less than 0
This commit is contained in:
@@ -1449,6 +1449,8 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
|
|||||||
if (!hh->ParamList["bouquet"].empty()) {
|
if (!hh->ParamList["bouquet"].empty()) {
|
||||||
// list for given bouquet
|
// list for given bouquet
|
||||||
BouquetNr = atoi(hh->ParamList["bouquet"].c_str());
|
BouquetNr = atoi(hh->ParamList["bouquet"].c_str());
|
||||||
|
if (BouquetNr < 0)
|
||||||
|
BouquetNr = 0;
|
||||||
if (BouquetNr > 0)
|
if (BouquetNr > 0)
|
||||||
BouquetNr--;
|
BouquetNr--;
|
||||||
if((BouquetNr > 0) && (BouquetNr >= bsize))
|
if((BouquetNr > 0) && (BouquetNr >= bsize))
|
||||||
|
Reference in New Issue
Block a user