Fixed a null-pointer dereference pointed out by Olivier Thauvin.

This commit is contained in:
Wayne Davison
2007-08-16 01:22:46 +00:00
parent e208631a5b
commit 4eff3051a0

View File

@@ -300,7 +300,7 @@ int open_socket_out_wrapped(char *host, int port, const char *bind_addr,
{ {
char *prog = getenv("RSYNC_CONNECT_PROG"); char *prog = getenv("RSYNC_CONNECT_PROG");
if (strchr(prog, '%')) { if (prog && strchr(prog, '%')) {
int hlen = strlen(host); int hlen = strlen(host);
int len = strlen(prog) + 1; int len = strlen(prog) + 1;
char *f, *t; char *f, *t;