]> 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:56:05 +0000 (20:56 +0000)
committerMatthew Jordan <mjordan@digium.com>
Tue, 17 Apr 2012 20:56:05 +0000 (20:56 +0000)
commit01653938d7d62a61df250051621a4c39559cd560
tree403ea6f17f82f50344ff842a215ffea96d8e5166
parent380734fd7b295bb79f04ad0a32bad1a4dc3e959f
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/
........

Merged revisions 362355 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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