]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_aes: fix misuse of strlen on binary data 37/2437/2
authorGianluca Merlo <gianluca.merlo@gmail.com>
Sat, 19 Mar 2016 01:32:51 +0000 (02:32 +0100)
committerRichard Mudgett <rmudgett@digium.com>
Sat, 19 Mar 2016 03:04:18 +0000 (22:04 -0500)
commit8f94f947f575630200b6602eda64b1172ecae101
tree24f38edeb9a7c919c61d0a95b2b3c504f5adb76e
parent4aaf8f2ace38346db10289be867195e6a2a5d96c
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