Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 30f63a5c authored by Rob Swindell's avatar Rob Swindell 💬

NULL pointer checks in strListSort*() and strListDup()

parent f615b604
......@@ -483,21 +483,25 @@ static int QSORT_CALLBACK_TYPE strListCompareAlphaCaseReverse(const void *arg1,
void strListSortAlpha(str_list_t list)
{
if(list != NULL)
qsort(list,strListCount(list),sizeof(char*),strListCompareAlpha);
}
void strListSortAlphaReverse(str_list_t list)
{
if(list != NULL)
qsort(list,strListCount(list),sizeof(char*),strListCompareAlphaReverse);
}
void strListSortAlphaCase(str_list_t list)
{
if(list != NULL)
qsort(list,strListCount(list),sizeof(char*),strListCompareAlphaCase);
}
void strListSortAlphaCaseReverse(str_list_t list)
{
if(list != NULL)
qsort(list,strListCount(list),sizeof(char*),strListCompareAlphaCaseReverse);
}
......@@ -506,6 +510,8 @@ str_list_t strListDup(str_list_t list)
str_list_t ret;
size_t count=0;
if(list == NULL)
return NULL;
ret = strListInit();
for(; *list; list++)
strListAppend(&ret, *list, count++);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment