]> 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)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 27 Apr 2022 07:03:06 +0000 (02:03 -0500)
commitea401644fe6dc372d889bc8614af5ae00ec4bfa3
tree66f82eb3c6bdb7040068c518727e32fb4609ce2f
parent40df42fd03ec55375b86bfba02e2420895b02696
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