summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--funcs/func_aes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_aes.c b/funcs/func_aes.c
index 3338118f9..f4a8d06b7 100644
--- a/funcs/func_aes.c
+++ b/funcs/func_aes.c
@@ -146,7 +146,7 @@ static int aes_helper(struct ast_channel *chan, const char *cmd, char *data,
}
if (encrypt) { /* if encrypting encode result to base64 */
- ast_base64encode(buf, (unsigned char *) tmp, strlen(tmp), len);
+ ast_base64encode(buf, (unsigned char *) tmp, tmpP - tmp, len);
} else {
memcpy(buf, tmp, len);
}