]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix places where a negative return from ftello could be used as invalid input
authorMatthew Jordan <mjordan@digium.com>
Tue, 17 Apr 2012 20:53:56 +0000 (20:53 +0000)
committerMatthew Jordan <mjordan@digium.com>
Tue, 17 Apr 2012 20:53:56 +0000 (20:53 +0000)
commit2d7a927c8136f2bb36a46d000fde468adca003c9
tree7fa380aadf2560c17a7498c4d796f6754f699bdc
parentbcd63be3cdc21f6733411863685c08c53ca9bf0c
Fix places where a negative return from ftello could be used as invalid input

In a variety of locations in both reading and writing a file, the result
from the C library function ftello is used as input to other functions.  For
the parameters and functions in question, a negative value is invalid input.
This patch checks the return value from the ftello function to determine if
we were able to determine the current position in the file stream and, if not,
fail gracefully.

(issue ASTERISK-19655)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/1863/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@362355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
funcs/func_env.c