From: Alan T. DeKok Date: Thu, 7 Apr 2022 17:42:58 +0000 (-0400) Subject: copy at the correct offset X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0758cf4455d93d5ba585fa27fd9e44d21eba1fa9;p=thirdparty%2Ffreeradius-server.git copy at the correct offset --- diff --git a/src/lib/util/value.c b/src/lib/util/value.c index 161a77adba..4a61e18e03 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -2766,7 +2766,7 @@ static inline int fr_value_box_cast_integer_to_integer(UNUSED TALLOC_CTX *ctx, f memcpy(((uint8_t *)&tmp) + (sizeof(tmp) - len), ((uint8_t const *)src) + fr_value_box_offsets[src->type], len); #else - memcpy(&tmp, src, len); + memcpy(&tmp, ((uint8_t const *)src) + fr_value_box_offsets[src->type], len); #endif break; }