]> 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:12 +0000 (08:32 -0600)
commitbf7c808604ead43732fcb357fc0c4f6de497b290
treeb47f1e8fe635c5c8b9d5b4421c17a1bb38758408
parent990a91b44ae055d003ebd4890ed2c74c5e0636a0
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