From: Arran Cudbard-Bell Date: Thu, 25 Jan 2018 03:06:10 +0000 (-0700) Subject: Need to shallow copy the map for !* ANY X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63afca8697e1bd3617da5cd61c52f31b9b1a4e83;p=thirdparty%2Ffreeradius-server.git Need to shallow copy the map for !* ANY --- diff --git a/src/main/map.c b/src/main/map.c index 42453682fbf..e4498810217 100644 --- a/src/main/map.c +++ b/src/main/map.c @@ -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;