]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Need to shallow copy the map for !* ANY
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 25 Jan 2018 03:06:10 +0000 (20:06 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 25 Jan 2018 19:12:22 +0000 (12:12 -0700)
src/main/map.c

index 42453682fbffa7c17676e8d7e448b6a74dce7dd5..e4498810217a22b32477a1aa4463492c1239df3c 100644 (file)
@@ -796,7 +796,11 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
                if (!n) return -1;
 
                n->map = map;
-               memcpy(&n->mod, &map, sizeof(n->mod));
+               n->mod = map_alloc(n);  /* Need to duplicate input map, so next pointer is NULL */
+               n->mod->lhs = map->lhs;
+               n->mod->op = map->op;
+               n->mod->rhs = map->rhs;
+
                *out = n;
 
                return 0;