From 910ee8c92e1c129b5699940aef4cfb8e5ca23df9 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 12 Jun 2005 06:07:23 +0000 Subject: [PATCH] In clean_flist(), fixed the setting of the flist->high value for an empty list so that it can't cause a crash if it gets passed to flist_find(). --- flist.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flist.c b/flist.c index 5526e201..64ff0077 100644 --- a/flist.c +++ b/flist.c @@ -1471,8 +1471,12 @@ static void clean_flist(struct file_list *flist, int strip_root, int no_dups) { int i, prev_i = 0; - if (!flist || flist->count == 0) + if (!flist) + return; + if (flist->count == 0) { + flist->high = -1; return; + } sorting_flist = flist; qsort(flist->files, flist->count, -- 2.34.1