From: Arran Cudbard-Bell Date: Fri, 14 Dec 2012 18:50:12 +0000 (+0000) Subject: Fix condition X-Git-Tag: release_3_0_0_beta1~1362 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96a160f7fd3618b2ecb39290cdb3c3393626f094;p=thirdparty%2Ffreeradius-server.git Fix condition --- diff --git a/src/modules/rlm_rest/rest.c b/src/modules/rlm_rest/rest.c index 5e6b495afae..0a0ac8d0a01 100644 --- a/src/modules/rlm_rest/rest.c +++ b/src/modules/rlm_rest/rest.c @@ -2393,7 +2393,16 @@ ssize_t rest_uri_build(rlm_rest_t *instance, rlm_rest_section_t *section, p = section->uri; - while ((q = strchr(p, '/')) && (count++ < 3)) p = (q + 1); + /* + * All URLs must contain at least :/// + */ + while (q = strchr(p, '/')) { + p = q + 1; + + if (++count == 3) { + break; + } + } if (count != 3) { radlog(L_ERR, "rlm_rest (%s): Error URI is malformed,"