From: Arran Cudbard-Bell Date: Thu, 2 Dec 2021 15:19:19 +0000 (-0600) Subject: Strings need to be copied to the to_cast box first X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae85275549b3036ac4e92f7fd40dd17ca286fdaf;p=thirdparty%2Ffreeradius-server.git Strings need to be copied to the to_cast box first --- diff --git a/src/lib/redis/redis.c b/src/lib/redis/redis.c index 377a5ed1d6f..76881a82243 100644 --- a/src/lib/redis/redis.c +++ b/src/lib/redis/redis.c @@ -278,9 +278,9 @@ int fr_redis_reply_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, redisReply case REDIS_REPLY_STRING: case REDIS_REPLY_STATUS: if (shallow) { - fr_value_box_bstrndup_shallow(out, NULL, reply->str, reply->len, true); + fr_value_box_bstrndup_shallow(to_cast, NULL, reply->str, reply->len, true); } else { - if (fr_value_box_bstrndup(ctx, out, NULL, reply->str, reply->len, true) < 0) return -1; + if (fr_value_box_bstrndup(ctx, to_cast, NULL, reply->str, reply->len, true) < 0) return -1; } break;