rsync 2.6.5 segfault using --fuzzy & --link-dest
Wayne Davison
wayned at samba.org
Sun Jun 12 06:22:39 GMT 2005
On Sat, Jun 11, 2005 at 02:05:48PM -0400, Erik Jan Tromp wrote:
> #0 0x08060566 in flist_find ()
> #1 0x0804c6cd in recv_generator ()
OK, the crash turned out to be caused by an empty file-list not getting
its "high" value set correctly. If such an empty list gets passed to
flist_find(), it would crash. This is not something that normally
happens, but in the case where an empty destination directory is matched
up with a list-dest directory that has a file that is present but not
up-to-date, rsync triggers the bug. Attached is a patch to fix this.
Thanks for your help!
..wayne..
-------------- next part --------------
--- flist.c 27 May 2005 18:15:18 -0000 1.297
+++ flist.c 12 Jun 2005 06:04:10 -0000
@@ -1471,8 +1471,12 @@ static void clean_flist(struct file_list
{
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,
More information about the rsync
mailing list