From a26ff4a583c0a728f763a620da4e5400e2091299 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Mon, 13 Apr 2015 17:13:02 -0400 Subject: [PATCH] Need to set vp_length when deserializing cache entires --- src/modules/rlm_cache/serialize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/rlm_cache/serialize.c b/src/modules/rlm_cache/serialize.c index 66f2b970a471..c941b4246503 100644 --- a/src/modules/rlm_cache/serialize.c +++ b/src/modules/rlm_cache/serialize.c @@ -168,8 +168,7 @@ int cache_deserialize(rlm_cache_entry_t *c, char *in, ssize_t inlen) } /* - * Convert literal to a type appropriate for - * the VP. + * Convert literal to a type appropriate for the VP. */ if (tmpl_cast_in_place(map->rhs, map->lhs->tmpl_da->type, map->lhs->tmpl_da) < 0) goto error; @@ -177,6 +176,7 @@ int cache_deserialize(rlm_cache_entry_t *c, char *in, ssize_t inlen) len = value_data_copy(vp, &vp->data, map->rhs->tmpl_data_type, &map->rhs->tmpl_data_value, map->rhs->tmpl_data_length); if (len < 0) goto error; + vp->vp_length = len; /* * Pull out the special attributes, and set the