summaryrefslogtreecommitdiff
path: root/funcs
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-03-21 15:16:27 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-03-21 15:16:27 -0500
commitc21cee80cc21fd48f29f23eabb7206417c4a7ef6 (patch)
tree68e2523c3cc6d35fb0da4b72c0145161315a54d1 /funcs
parenta3c9a74a02014986181ce46bcecb74154ae9eb01 (diff)
parent8f94f947f575630200b6602eda64b1172ecae101 (diff)
Merge "func_aes: fix misuse of strlen on binary data"
Diffstat (limited to 'funcs')
-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 9347b6f8e..d80636f6d 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);
}