]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correct src offset in _tmpl_to_atype
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Nov 2016 12:55:28 +0000 (07:55 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Nov 2016 17:42:42 +0000 (12:42 -0500)
src/main/tmpl.c

index 639d167dbbfcdd2afacafc567947caf9b93461e2..931a2bccc88b0281fa054cf41acb21186a8bcab7 100644 (file)
@@ -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