I upgraded to rsync 2.5.2 and started to get the error Warning: unexpected read size of 0 in map_ptr when sending just about any file from a Solaris 2.5.1 system to Linux systems, and then the file that is sent ends up being the wrong size.
Through gdb and trial & error I discovered that if I back out the security fix in rsync.h at http://cvs.samba.org/cgi-bin/cvsweb/rsync/rsync.h.diff?r1=1.116&r2=1.117&f=h and recompile match.c on only the sender side then the problem goes away. Further trial & error resulted in the patch below to fix the problem. Martin, I think this is probably serious enough to warrant an immediate new release. - Dave Dykstra --- match.c.O Tue Jan 29 15:31:37 2002 +++ match.c Tue Jan 29 15:31:54 2002 @@ -246,7 +246,7 @@ match. The 3 reads are caused by the running match, the checksum update and the literal send. */ - if (offset-last_match >= CHUNK_SIZE+s->n && + if (offset-last_match >= CHUNK_SIZE+(int)s->n && (end-offset > CHUNK_SIZE)) { matched(f,s,buf,offset - s->n, -2); }