]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Check for IO stream failures in various format's truncate/seek operations
authorMatthew Jordan <mjordan@digium.com>
Mon, 16 Apr 2012 19:30:16 +0000 (19:30 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 16 Apr 2012 19:30:16 +0000 (19:30 +0000)
commitb3a38a51c73d6928c0014ad6a6d8604c18e88a40
treea722e54bfa904ff7f130aee674bdc5e1c943ea74
parent6afefc4eb106580a6009b77e6f745ee4de7ef863
Check for IO stream failures in various format's truncate/seek operations

For the formats that support seek and/or truncate operations, many of
the C library calls used to determine or set the current position indicator
in the file stream were not being checked.  In some situations, if an error
occurred, a negative value would be returned from the library call.  This
could then be interpreted inappropriately as positional data.

This patch checks the return values from these library calls before
using them in subsequent operations.

(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@362151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
15 files changed:
formats/format_g719.c
formats/format_g723.c
formats/format_g729.c
formats/format_gsm.c
formats/format_h263.c
formats/format_h264.c
formats/format_ilbc.c
formats/format_pcm.c
formats/format_siren14.c
formats/format_siren7.c
formats/format_sln.c
formats/format_sln16.c
formats/format_vox.c
formats/format_wav.c
formats/format_wav_gsm.c