summaryrefslogtreecommitdiff
path: root/libavformat/mvdec.c
Commit message (Collapse)AuthorAge
* avformat/mvdec: check for EOFPaul B Mahol2017-11-05
| | | | | | Fixes #6805. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/mvdec: Fix DoS due to lack of eof checkMichael Niedermayer2017-08-27
| | | | | | | Fixes: loop.mv Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-21
|\ | | | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-30
| | | | | | | | | | | | | | | | It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
* | mvdec: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | | | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | avformat/mvdec: Use 64bit for ret to avoid overflowMichael Niedermayer2015-02-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mvdec: Check size in read_table() for validityMichael Niedermayer2014-10-28
| | | | | | | | | | | | | | | | | | | | | | | | This check is redundant with the previous commit but it provides better error messages and feedback while the previous commit ensures that var_read_string() doesnt return uninitialized arrays if it itself is feeded with an invalid size possibly through a different future codepath. Fixes: asan_heap-oob_49b1e5_12_011.movie Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mvdec: Check size for validity in var_read_string()Michael Niedermayer2014-10-28
| | | | | | | | | | | | | | Fixes out of array read Fixes: asan_heap-oob_49b1e5_12_011.movie Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '55ddd700c67529ff2c6c4e976673f1341bba7a82'Michael Niedermayer2014-04-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '55ddd700c67529ff2c6c4e976673f1341bba7a82': Silicon Graphics Movie demuxer Conflicts: Changelog libavformat/mvdec.c libavformat/version.h See: 6fb40779cd3457a819e20d6db91a142c47cad3c2 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Silicon Graphics Movie demuxerPeter Ross2014-04-19
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc & lavf: replace deprecated av_log* functionsPaul B Mahol2013-03-15
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* mvdec: check var_read_string() return valueMichael Niedermayer2013-01-27
| | | | | | | Prevent null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mvdec: Check the frame counter against the correct limit.Michael Niedermayer2013-01-27
| | | | | | | fixes out of array reads Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mvdec: check channel count.Michael Niedermayer2013-01-22
| | | | | | | Fixes division by 0 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mvdec: minor simplification, remove av_inv_q()Michael Niedermayer2013-01-22
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mvdec: use avpriv_set_pts_info() instead of directly setting tb.Michael Niedermayer2013-01-22
| | | | | | | Fixes division by 0 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mcdec: suppress "warning: a/vst may be used uninitialized in this function"Michael Niedermayer2012-12-24
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Silicon Graphics Movie (.mv) demuxerPeter Ross2012-12-17
Signed-off-by: Peter Ross <pross@xvid.org>