diff options
Diffstat (limited to 'blacklist.c')
-rw-r--r-- | blacklist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/blacklist.c b/blacklist.c index a6ae2d7..2db89a4 100644 --- a/blacklist.c +++ b/blacklist.c @@ -71,7 +71,7 @@ cBlacklist::cBlacklist(void) catvalues = (char**) malloc(SearchExtCats.Count() * sizeof(char*)); cSearchExtCat *SearchExtCat = SearchExtCats.First(); int index = 0; - while (SearchExtCat) + while (SearchExtCat) { catvalues[index] = (char*)malloc(MaxFileName); *catvalues[index] = 0; @@ -92,7 +92,7 @@ cBlacklist::~cBlacklist(void) { cSearchExtCat *SearchExtCat = SearchExtCats.First(); int index = 0; - while (SearchExtCat) + while (SearchExtCat && index < (int)(sizeof(catvalues)/sizeof(char*))) { free(catvalues[index]); SearchExtCat = SearchExtCats.Next(SearchExtCat); @@ -109,7 +109,7 @@ cBlacklist& cBlacklist::operator= (const cBlacklist &Blacklist) catvalues = (char**) malloc(SearchExtCats.Count() * sizeof(char*)); cSearchExtCat *SearchExtCat = SearchExtCats.First(); int index = 0; - while (SearchExtCat) + while (SearchExtCat) { catvalues[index] = (char*)malloc(MaxFileName); *catvalues[index] = 0; @@ -141,7 +141,7 @@ void cBlacklist::CopyFromTemplate(const cSearchExt* templ) cSearchExtCat *SearchExtCat = SearchExtCats.First(); int index = 0; - while (SearchExtCat) + while (SearchExtCat) { strcpy(catvalues[index], templ->catvalues[index]); SearchExtCat = SearchExtCats.Next(SearchExtCat); |