]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_aes: fix misuse of strlen on binary data 38/2438/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:20:48 +0000 (07:20 -0500)
commit91bdaa9251578e4768a0d78251e7743e2d065b5f
treeccfded1536276cd42ac062174c4881397e74654c
parentc016556aaa75d80e2748023512525638644d93a2
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