Skip to content

Commit

Permalink
Return error if we don't have sufficient buffer space to write out de…
Browse files Browse the repository at this point in the history
…coded base64 string
  • Loading branch information
arr2036 committed Mar 14, 2014
1 parent 29c354e commit d0774ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/rlm_expr/rlm_expr.c
Expand Up @@ -744,6 +744,7 @@ static ssize_t base64_to_hex_xlat(UNUSED void *instance, UNUSED REQUEST *request
if ((size_t)((declen * 2) + 1) > outlen) {
REDEBUG("Base64 conversion failed, output buffer exhausted, needed %zd bytes, have %zd bytes",
(declen * 2) + 1, outlen);
return -1;
}

return fr_bin2hex(out, decbuf, declen);
Expand Down

0 comments on commit d0774ce

Please sign in to comment.