Skip to content

Commit

Permalink
Merge "func_aes: fix misuse of strlen on binary data"
Browse files Browse the repository at this point in the history
  • Loading branch information
zuul authored and Gerrit Code Review committed Mar 21, 2016
2 parents a3c9a74 + 8f94f94 commit c21cee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion funcs/func_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c21cee8

Please sign in to comment.