rsync 3 (cvs) segfault if $RSYNC_CONNECT_PROG is not set
Olivier Thauvin
nanardon at nanardon.zarb.org
Wed Aug 15 04:18:59 GMT 2007
$ ./rsync distrib-coffee.ipsl.jussieu.Fr::
Erreur de segmentation
Easy to understand and fix (after 3 minutes inside a debugger):
Index: socket.c
===================================================================
RCS file: /cvsroot/rsync/socket.c,v
retrieving revision 1.130
diff -u -b -B -w -p -p -u -r1.130 socket.c
--- socket.c 11 Aug 2007 16:20:56 -0000 1.130
+++ socket.c 15 Aug 2007 04:17:16 -0000
@@ -300,7 +300,7 @@ int open_socket_out_wrapped(char *host,
{
char *prog = getenv("RSYNC_CONNECT_PROG");
- if (strchr(prog, '%')) {
+ if (prog && strchr(prog, '%')) {
int hlen = strlen(host);
int len = strlen(prog) + 1;
char *f, *t;
Regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.samba.org/archive/rsync/attachments/20070815/93f25dd7/attachment.bin
More information about the rsync
mailing list