X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/e5f1a96ff8a62685b0499e9c9f17300501bc5c8f..1b42f628f495ff0cdaa8a7c219d8ce33192281fe:/socket.c diff --git a/socket.c b/socket.c index 9017007c..ca8c5612 100644 --- a/socket.c +++ b/socket.c @@ -25,6 +25,7 @@ * emulate it using the KAME implementation. */ #include "rsync.h" +#include "ifuncs.h" #include #include #include @@ -300,7 +301,7 @@ int open_socket_out_wrapped(char *host, int port, const char *bind_addr, { 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;