]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_aes: fix misuse of strlen on binary data 39/2439/1
authorGianluca Merlo <gianluca.merlo@gmail.com>
Sat, 19 Mar 2016 01:32:51 +0000 (02:32 +0100)
committerGianluca Merlo <gianluca.merlo@gmail.com>
Sat, 19 Mar 2016 12:21:14 +0000 (07:21 -0500)
commitaa2fcd244eaf9e6099479d289f1833ae471fb2ba
tree814fd4dbcafd0bc4f1a075ce0b1641397db0b84c
parent9444ddadf8525d1ce66a1faf1db97f9f6c265ca4
func_aes: fix misuse of strlen on binary data

The encryption code for AES_ENCRYPT evaluates the length of the data to
be encoded in base64 using strlen. The data is binary, thus the length
of it can be underestimated at the first NULL character.
Reuse the write pointer offset to evaluate it, instead.

ASTERISK-25857 #close

Change-Id: If686b5d570473eb926693c73461177b35b13b186
funcs/func_aes.c