]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix offset bug in %{string:...}
authorAlan T. DeKok <aland@freeradius.org>
Sun, 3 Jul 2011 09:07:49 +0000 (11:07 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 3 Jul 2011 09:13:53 +0000 (11:13 +0200)
It prints the correct amount with the correct limits, but
to the wrong location

src/main/xlat.c

index 6623396d39c95b398d6944f3f75e729c514207d9..687a6126f2296717afdda00f2afbc6e56b341414 100644 (file)
@@ -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;
 }