summaryrefslogtreecommitdiffstats
path: root/LICENSE.LGPL
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-09-08 16:16:20 +0200
committersfan5 <sfan5@live.de>2018-10-01 10:41:01 +0200
commit7e85dc2167b7524308159915d5c1d3341464977f (patch)
tree6bd8b4290bac01ca968349c136ac486bcc1a65ad /LICENSE.LGPL
parenta6fb94cf07b8664fecb100489368e0f35d56f946 (diff)
downloadmpv-7e85dc2167b7524308159915d5c1d3341464977f.tar.bz2
mpv-7e85dc2167b7524308159915d5c1d3341464977f.tar.xz
stream_libarchive: fix hangs when demuxer does out of bound seeks
This happened with a .flac file inside an archive. It tried to seek beyond the end of the archive entry in a format where seeking isn't supported. stream_libarchive handles these situations by skipping data. But when the end of the archive is reached, archive_read_data() returns 0. While libarchive didn't bother to fucking document this, they do say it's supposed to work like read(), so I guess a return value of 0 really means EOF. So change the "< 0" to "<= 0". Also add some error logging. The same file actually worked without out of bounds reads when extracted, so there still might be something very wrong.
Diffstat (limited to 'LICENSE.LGPL')
0 files changed, 0 insertions, 0 deletions