Skip to content

Commit

Permalink
Revert "Partial revert of 1453162"
Browse files Browse the repository at this point in the history
This reverts commit 60205b0.
  • Loading branch information
arr2036 committed Mar 24, 2014
1 parent a4f60a5 commit b91eb7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/rlm_perl/rlm_perl.c
Expand Up @@ -488,7 +488,7 @@ static void perl_store_vps(TALLOC_CTX *ctx, VALUE_PAIR *vps, HV *rad_hv)
char const *name;
char namebuf[256];
char buffer[1024];
int len;
size_t len;

hv_undef(rad_hv);

Expand Down Expand Up @@ -533,7 +533,7 @@ static void perl_store_vps(TALLOC_CTX *ctx, VALUE_PAIR *vps, HV *rad_hv)
vp;
vp = fr_cursor_next(&cursor)) {
len = vp_prints_value(buffer, sizeof(buffer), vp, 0);
av_push(av, newSVpv(buffer, len));
av_push(av, newSVpv(buffer, truncate_len(len, sizeof(buffer))));
}
(void)hv_store(rad_hv, name, strlen(name), newRV_noinc((SV *)av), 0);

Expand All @@ -543,7 +543,7 @@ static void perl_store_vps(TALLOC_CTX *ctx, VALUE_PAIR *vps, HV *rad_hv)
*/
} else {
len = vp_prints_value(buffer, sizeof(buffer), sublist, 0);
(void)hv_store(rad_hv, name, strlen(name), newSVpv(buffer, len), 0);
(void)hv_store(rad_hv, name, strlen(name), newSVpv(buffer, truncate_len(len, sizeof(buffer))), 0);
}

pairfree(&sublist);
Expand Down

0 comments on commit b91eb7b

Please sign in to comment.