From: Arran Cudbard-Bell Date: Thu, 17 Nov 2016 12:55:28 +0000 (-0500) Subject: Correct src offset in _tmpl_to_atype X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa9ec0ce46de5992b1ad60b0e9f1d442b6ffd35e;p=thirdparty%2Ffreeradius-server.git Correct src offset in _tmpl_to_atype --- diff --git a/src/main/tmpl.c b/src/main/tmpl.c index 639d167dbbf..931a2bccc88 100644 --- a/src/main/tmpl.c +++ b/src/main/tmpl.c @@ -1976,7 +1976,7 @@ ssize_t _tmpl_to_atype(TALLOC_CTX *ctx, void *out, RDEBUG4("Copying %zu bytes to %p from offset %zu", value_box_field_sizes[dst_type], *((void **)out), value_box_offsets[dst_type]); - memcpy(out, &from_cast + value_box_offsets[dst_type], value_box_field_sizes[dst_type]); + memcpy(out, ((uint8_t *)&from_cast) + value_box_offsets[dst_type], value_box_field_sizes[dst_type]); /* * Frees any memory allocated for temporary buffers