mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
fish: Don't segfault here is 'words' happens to be NULL (found by Coverity).
This commit is contained in:
@@ -214,7 +214,8 @@ complete_dest_paths_generator (const char *text, int state)
|
||||
rl_attempted_completion_over = 1;
|
||||
|
||||
/* Sort the words so the list is stable over multiple calls. */
|
||||
qsort (words, nr_words, sizeof (struct word), compare_words);
|
||||
if (words)
|
||||
qsort (words, nr_words, sizeof (struct word), compare_words);
|
||||
|
||||
/* Complete the string. */
|
||||
while (index < nr_words) {
|
||||
|
||||
Reference in New Issue
Block a user