]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Bug fix in fr_value_box_bstrsnteal.
authorPhilippe Wooding <philippe.wooding@networkradius.com>
Fri, 7 Dec 2018 14:01:56 +0000 (15:01 +0100)
committerPhilippe Wooding <philippe.wooding@networkradius.com>
Fri, 21 Dec 2018 14:45:07 +0000 (15:45 +0100)
'len' is not updated when talloc_realloc_size is called.

src/lib/util/value.c

index 6fa745619051281e4815581fe29d54bf45a751c2..4baf8e86678a308b7bace4af01cf10aeb0efda89 100644 (file)
@@ -3073,7 +3073,7 @@ int fr_value_box_bstrsnteal(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_dict_attr_t
        dst->type = FR_TYPE_STRING;
        dst->tainted = tainted;
        dst->vb_strvalue = str;
-       dst->datum.length = len - 1;
+       dst->datum.length = inlen;
        dst->enumv = enumv;
        dst->next = NULL;
 
@@ -4649,4 +4649,3 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
 
        return len;     /* Return the number of uint8s we would of written (for truncation detection) */
 }
-