]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_env: Prevent FILE() from reading garbage at end-of-file
authorSean Bright <sean.bright@gmail.com>
Wed, 13 Nov 2019 20:25:22 +0000 (15:25 -0500)
committerGeorge Joseph <gjoseph@digium.com>
Mon, 18 Nov 2019 14:32:41 +0000 (08:32 -0600)
commit92bb381d5d1878b9268e5da23a2e85cba3cdb715
tree7e245cc7f2b1d95433e7f0efe2d01fb5a639fce4
parentd638d9c6c6b9ffe8feb0ee35466a6d884a5d04e4
func_env: Prevent FILE() from reading garbage at end-of-file

If the last line of a file does not have a terminating EOL sequence, we
potentially add garbage to the value returned from the FILE() function.

There is no overflow potential here as we are reading from a buffer of a
known size, we are just reading too much of it.

ASTERISK-26481 #close

Change-Id: I50dd4fcf416fb3c83150040a1a79a59d9eb1ae01
funcs/func_env.c