]> git.ipfire.org Git - thirdparty/asterisk.git/commit
file.c: Prevent formats from seeking negative offsets.
authorNaveen Albert <asterisk@phreaknet.org>
Tue, 1 Mar 2022 01:29:43 +0000 (01:29 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 26 Apr 2022 23:42:05 +0000 (18:42 -0500)
commit237defce8afcb5a31c92e2811fecf01e3474a478
tree4a90b48864ef76d48828057d55e5f3d72cac9e75
parentf97386bd54e9be6eae7e440d4f90849d3fc496ca
file.c: Prevent formats from seeking negative offsets.

Currently, if a user uses an application like ControlPlayback
to try to rewind a file past the beginning, this can throw
warnings when the file format (e.g. PCM) tries to seek to
a negative offset.

Instead of letting file formats try (and fail) to seek a
negative offset, we instead now catch this in the rewind
function to ensure that we never seek an offset less than 0.
This prevents legitimate user actions from triggering warnings
from any particular file formats.

ASTERISK-29943 #close

Change-Id: Ia53f2623f57898f4b8e5c894b968b01e95426967
main/file.c