From: Wayne Davison Date: Wed, 1 Aug 2007 22:25:02 +0000 (+0000) Subject: Fixed the port-parsing in an rsync:// path; e.g., this now X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/444f9f7b04055c56fe771dec011b27200de3703f Fixed the port-parsing in an path; e.g., this now works properly: rsync://backup@otherbox/module/a:123:b --- 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); }