From: Arran Cudbard-Bell Date: Mon, 20 Sep 2021 23:02:26 +0000 (-0500) Subject: Allowing copying NULL boxes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d427d34f38ec03992b1af45e48de6a580a74c11f;p=thirdparty%2Ffreeradius-server.git Allowing copying NULL boxes --- diff --git a/src/lib/util/value.c b/src/lib/util/value.c index d5d41377bd..5f2923d298 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -3332,8 +3332,6 @@ void fr_value_box_clear(fr_value_box_t *data) */ int fr_value_box_copy(TALLOC_CTX *ctx, fr_value_box_t *dst, const fr_value_box_t *src) { - if (!fr_cond_assert(src->type != FR_TYPE_NULL)) return -1; - switch (src->type) { default: memcpy(((uint8_t *)dst) + fr_value_box_offsets[src->type], @@ -3342,6 +3340,10 @@ int fr_value_box_copy(TALLOC_CTX *ctx, fr_value_box_t *dst, const fr_value_box_t fr_value_box_copy_meta(dst, src); break; + case FR_TYPE_NULL: + fr_value_box_copy_meta(dst, src); + break; + case FR_TYPE_STRING: { char *str = NULL;