mirror of
https://github.com/nmap/nmap.git
synced 2026-02-14 09:26:35 +00:00
Return NULL in reason_sort() if tail is NULL as it's possible tail never gets redefined. I think that's better than an assert(tail). Found with Coverity, CID 24
This commit is contained in:
@@ -214,7 +214,9 @@ static state_reason_summary_t *reason_sort(state_reason_summary_t *list) {
|
||||
}
|
||||
p = q;
|
||||
}
|
||||
tail->next = NULL;
|
||||
if (!tail)
|
||||
return NULL;
|
||||
tail->next = NULL;
|
||||
if (nmerges <= 1)
|
||||
return list;
|
||||
insize *= 2;
|
||||
|
||||
Reference in New Issue
Block a user