AlgoListSz returns 0 if algoList is NULL

pull/822/head
Ruby Martin 2025-07-14 10:47:51 -06:00
parent 8c0c7fd240
commit a76e80f03e
1 changed files with 3 additions and 0 deletions

View File

@ -3988,6 +3988,9 @@ static word32 AlgoListSz(const char* algoList)
{
word32 algoListSz;
if (algoList == NULL)
return 0;
algoListSz = (word32)WSTRLEN(algoList);
if (algoList[algoListSz-1] == ',') {
--algoListSz;