From: Alan T. DeKok Date: Sun, 3 Jul 2011 09:07:49 +0000 (+0200) Subject: Fix offset bug in %{string:...} X-Git-Tag: release_3_0_0_beta0~734 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e68be18da1b32d8f536d10b3cb5b621dad8d28a;p=thirdparty%2Ffreeradius-server.git Fix offset bug in %{string:...} It prints the correct amount with the correct limits, but to the wrong location --- diff --git a/src/main/xlat.c b/src/main/xlat.c index 6623396d39c..687a6126f22 100644 --- a/src/main/xlat.c +++ b/src/main/xlat.c @@ -513,10 +513,8 @@ static size_t xlat_string(UNUSED void *instance, REQUEST *request, if (vp->type != PW_TYPE_OCTETS) goto nothing; - *out++ = '"'; - len = fr_print_string(vp->vp_strvalue, vp->length, out + 1, outlen - 3); - out[len] = '"'; - out[len + 1] = '\0'; + len = fr_print_string(vp->vp_strvalue, vp->length, out, outlen); + out[len] = '\0'; return len + 2; }