]> 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:46:15 +0000 (18:46 -0500)
commitea02bc368518e3d2b952c9f27db48f414d667bc9
treeabbc6b7ef3e5c1fc6f8a00d8d0f1eae2b0500f9c
parent8bc6d42a279045e92488f16372f2d4b417b6c7ef
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