From 444f9f7b04055c56fe771dec011b27200de3703f Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 1 Aug 2007 22:25:02 +0000 Subject: [PATCH] Fixed the port-parsing in an rsync:// path; e.g., this now works properly: rsync://backup@otherbox/module/a:123:b --- options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.c b/options.c index 4331fc65..a404a8da 100644 --- a/options.c +++ b/options.c @@ -1981,7 +1981,7 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr) if (p[1] == ':') *port_ptr = atoi(p+2); } else { - if ((p = strchr(s, ':')) != NULL) { + if ((p = strchr(s, ':')) != NULL && p < s + hostlen) { hostlen = p - s; *port_ptr = atoi(p+1); } -- 2.34.1