Bug 1432 - Arg array for rsync-daemon globbing only holds 1000 entries
Summary: Arg array for rsync-daemon globbing only holds 1000 entries
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.5.7
Hardware: All All
: P3 minor (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-05 10:57 UTC by Wayne Davison
Modified: 2005-04-01 11:24 UTC (History)
0 users

See Also:


Attachments
Make argv list dynamically allocated (6.04 KB, patch)
2004-06-05 11:00 UTC, Wayne Davison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne Davison 2004-06-05 10:57:10 UTC
Alan Burlison wrote:

rsync: connection unexpectedly closed (1598 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)

This is because the array used to hold the expanded filename glob (argv in
rsync_module(), clientserver.c) is only 1000 entries in size, and the above
archive directory contains more than 1000 files.  argv should probably be
allocated with malloc and grown as necessary with realloc.
Comment 1 Wayne Davison 2004-06-05 11:00:02 UTC
Created attachment 536 [details]
Make argv list dynamically allocated

Alan Burlison's suggested fix.
Comment 2 Wayne Davison 2004-06-05 13:43:28 UTC
My version of the patch is here:

http://rsync.samba.org/ftp/unpacked/rsync/patches/daemon-glob.patch

It was updated to work with CVS, to fix a bug in one of the realloc() calls, and
to neaten a few things up.
Comment 3 Wayne Davison 2004-06-09 15:01:56 UTC
Patch checked into CVS.