From 4eff3051a0d2d58c04e6f2ea7264a1e3b05caf9c Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 16 Aug 2007 01:22:46 +0000 Subject: [PATCH] Fixed a null-pointer dereference pointed out by Olivier Thauvin. --- socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socket.c b/socket.c index 9017007c..51c07f72 100644 --- a/socket.c +++ b/socket.c @@ -300,7 +300,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; -- 2.34.1