diff options
author | wm4 <wm4@nowhere> | 2015-08-18 00:14:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-18 00:14:37 +0200 |
commit | da8a9ff5891cc55b6ea978f11761d3a30b64269c (patch) | |
tree | 2f10ba67f994510db6f3356b9d16636148622743 /demux | |
parent | cf2fa9d3e5bd6b8ca3e1637080b665e896ea60a0 (diff) | |
download | mpv-da8a9ff5891cc55b6ea978f11761d3a30b64269c.tar.bz2 mpv-da8a9ff5891cc55b6ea978f11761d3a30b64269c.tar.xz |
demux_libarchive: reject 0-sized files
libarchive does strange things with them.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_libarchive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/demux/demux_libarchive.c b/demux/demux_libarchive.c index ae2bd95599..d0afb624c5 100644 --- a/demux/demux_libarchive.c +++ b/demux/demux_libarchive.c @@ -32,6 +32,9 @@ static int cmp_filename(const void *a, const void *b) static int open_file(struct demuxer *demuxer, enum demux_check check) { + if (stream_get_size(demuxer->stream) == 0) + return -1; + int flags = 0; if (check <= DEMUX_CHECK_REQUEST) flags |= MP_ARCHIVE_FLAG_UNSAFE; |