Skip to content

Commit

Permalink
Need to set vp_length when deserializing cache entires
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Apr 13, 2015
1 parent bd1e257 commit a26ff4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/rlm_cache/serialize.c
Expand Up @@ -168,15 +168,15 @@ 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;

vp = pairalloc(c, map->lhs->tmpl_da);
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
Expand Down

0 comments on commit a26ff4a

Please sign in to comment.