controlapi.cpp: fix segfault if the bouquet number passed is less than 0

Origin commit data
------------------
Branch: ni/coolstream
Commit: 0a4fffd038
Author: GetAway <get-away@t-online.de>
Date: 2023-04-09 (Sun, 09 Apr 2023)


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

------------------
This commit was generated by Migit
This commit is contained in:
GetAway
2023-04-09 16:16:57 +02:00
committed by vanhofen
parent 5b93d4378d
commit fbf43c459c

View File

@@ -1458,6 +1458,8 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh)
if (!hh->ParamList["bouquet"].empty()) {
// list for given bouquet
BouquetNr = atoi(hh->ParamList["bouquet"].c_str());
if (BouquetNr < 0)
BouquetNr = 0;
if (BouquetNr > 0)
BouquetNr--;
if((BouquetNr > 0) && (BouquetNr >= bsize))