Michael Niedermayer
0fe00cdc54
avcodec/truemotion2: Fix 2 integer overflows in tm2_update_block()
...
Fixes: signed integer overflow: -2147483648 + -1 cannot be represented in type 'int'
Fixes: 14107/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5694078680825856
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f4a1b8d409
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
b131d7653e
avcodec/jpeg2000: Check stepsize before using it
...
Fixes: value 1.87633e+10 is outside the range of representable values of type 'int'
Fixes: Undefined behavior
Fixes: 14246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5758393601490944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 06ef186fa1
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
85b8a4d2c7
avcodec/aacdec_fixed: Fix undefined shift in noise_scale()
...
Fixes: 13655/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5120559430500352
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8ea211ab79
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
bbbe82b142
avutil/avstring: Fix bug and undefined behavior in av_strncasecmp()
...
The function in case of n=0 would read more bytes than 0.
The end pointer could be beyond the allocated space, which
is undefined.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6f0e9a8634
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
26d7824352
avformat/mov: Skip stsd adjustment without chunks
...
Fixes: Assertion failure
Fixes: clusterfuzz-testcase-minimized-media_pipeline_integration_fuzzer-5683096400822272
Found-by: Clusterfuzz
Reported-by: Dan Sanders <sandersd@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 18a567c369
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
59ac418258
avformat/aadec: Check for scanf() failure
...
Fixes: use of uninitialized variables
Fixes: blank.aa
Found-by: Chamal De Silva <chamal.desilva@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ed188f6dcd
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
7751626787
avcodec/ccaption_dec: Add a blank like at the end to avoid rollup reading from outside
...
Fixes: index 20 out of bounds for type 'const char *[4][128]'
Fixes: 14367/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CCAPTION_fuzzer-5718819672162304
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f17e8e90bb
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
b27afd717d
avcodec/ivi: Move buffer/block end check to caller of ivi_dc_transform()
...
Fixes: assertion failure
Fixes: 14078/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5760571284127744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 110dce9633
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
76f6712057
avcodec/diracdec: Use 64bit in intermediate of global motion vector field generation
...
It seems the specification does not limit the value to 32bit
Fixes: signed integer overflow: -109611143 * 24 cannot be represented in type 'int'
Fixes: 13477/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5648337460527104
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 837820f385
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
12a6305799
avcodec/truemotion2: Fix integer overflow in tm2_decode_blocks()
...
Fixes: signed integer overflow: 255 + 2147483634 cannot be represented in type 'int'
Fixes: 13472/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5712444142387200
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0ad0533e91
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
Michael Niedermayer
1a71be4eaa
avcodec/rscc: Check that the to be uncompressed input is large enough
...
Fixes: Out of array access
Fixes: 13984/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-5734128093233152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3a0ec1511e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-14 23:30:37 +01:00
James Almer
45bf2f4d72
avcodec/bsf: check that AVBSFInternal was allocated before dereferencing it
...
This can happen when av_bsf_free() is called on av_bsf_alloc() failure.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit d889ae3396
)
2019-09-23 10:09:16 -03:00
Carl Eugen Hoyos
cfa7c079f7
lavf/rawenc: Only accept the appropriate stream type for raw muxers.
...
This does not affect the rawvideo muxer.
Fixes ticket #7979 .
(cherry picked from commit aef24efb0c
)
2019-09-06 19:01:27 -03:00
Stefan Schoenefeld
31161bc969
avcodec/h263dec: fix hwaccel decoding
...
Recently we encountered an issue when decoding a h.263 file:
FFmpeg will freeze when decoding h.263 video with NVDEC. Turns out this is not directly related to NVDEC but is a problem that shows with several other HW decoders like VDPAU, though the exact kind of error is different (either error messages or freezing[1]). The root cause is that ff_thread_finish_setup() is called twice per frame from ff_h263_decode_frame(). This is not supported by ff_thread_finish_setup() and specifically checked for and warned against in the functions code. The issue is also specific to hw accelerated decoding only as the second call to ff_thread_finish_setup() is only issued when hw acceleration is on. The fix is simple: add a check that the first call is only send when hw acceleration is off, and the second call only when hw acceleration is on (see attached patch). This works fine as far as I was able to test with vdpau and nvdec/nvcuvid hw decoding. The patch also adds NVDEC to the hw config list if available.
I also noticed a secondary issue when browsing through the code which is that, according to documentation, ff_thread_finish_setup() should only be called if the codec implements update_thread_context(), which h263dec does not. The patch does not address this and I'm not sure any action needs to be taken here at all.
[1] This is depending on whether or not the hw decoder sets the HWACCEL_CAPS_ASYNC_SAFE flag
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2019-08-04 16:24:54 +02:00
Mark Harris
29362d5f9a
avutil/mem: Fix invalid use of av_alloc_size
...
The alloc_size attribute is valid only on functions that return a
pointer. GCC 9 (not yet released) warns about invalid usage:
./libavutil/mem.h:342:1: warning: 'alloc_size' attribute ignored on a function returning int' [-Wattributes]
342 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
| ^~~~~~~~~~~~~
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4361293fcf
)
2019-07-23 01:18:40 -03:00
James Almer
bb22b9ce21
avformat/aacdec: resync to the next adts frame on invalid data instead of aborting
...
Should fix ticket #6634
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 881e1f5a62
)
2019-07-23 01:13:41 -03:00
James Almer
a9282fc964
avformat/aacdec: factorize the adts frame resync code
...
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit a38eab8b75
)
2019-07-23 00:46:46 -03:00
Michael Niedermayer
0ac9001ab9
Update for 3.4.6
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
n3.4.6
2019-03-28 10:23:26 +01:00
Michael Niedermayer
9ccc633068
avcodec/hevcdec: Avoid only partly skiping duplicate first slices
...
Fixes: NULL pointer dereference and out of array access
Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432
Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304
This also fixes the return code for explode mode
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 54655623a8
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-27 08:48:30 +01:00
Carl Eugen Hoyos
d31940f04e
lavc/bmp: Avoid a heap buffer overwrite for 1bpp input.
...
Found by Mingi Cho, Seoyoung Kim, and Taekyoung Kwon
of the Information Security Lab, Yonsei University.
(cherry picked from commit 1e34014010
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-27 08:47:30 +01:00
Michael Niedermayer
807d443c7e
avcodec/truemotion2: Fix integer overflow in tm2_null_res_block()
...
Fixes: signed integer overflow: 1111638592 - -2122219136 cannot be represented in type 'int'
Fixes: 13441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5732769815068672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1223696c72
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-25 15:32:07 +01:00
Michael Niedermayer
5e09dc8afe
avcodec/dfa: Check the chunk header is not truncated
...
Fixes: Timeout (11sec -> 3sec)
Fixes: 13218/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFA_fuzzer-5661074316066816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f20760fadb
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:52 +01:00
Michael Niedermayer
51d29541cb
avcodec/dvbsubdec: Check object position
...
Reference: ETSI EN 300 743 V1.2.1 7.2.2 Region composition segment
Fixes: Timeout
Fixes: 13325/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVBSUB_fuzzer-5143979392237568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a8c5ae4511
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:52 +01:00
Michael Niedermayer
d2fd2921e3
avcodec/cdgraphics: Use ff_set_dimensions()
...
Fixes: Timeout (17 sec -> 65 milli sec)
Fixes: 13264/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-5711167941509120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9a9f0e239c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:52 +01:00
Michael Niedermayer
2d825946a3
avformat/gdv: Check fps
...
Fixes: Division by 0
Fixes: ffmpeg_zero_division.bin
Found-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 38381400fc
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:52 +01:00
Michael Niedermayer
6689435190
avcodec/scpr: Fix use of uninitialized variable
...
Fixes: Undefined shift
Fixes: 12911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5677102915911680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 53248acfb3
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:52 +01:00
Michael Niedermayer
f2e3eae204
avcodec/qpeg: Limit copy in qpeg_decode_intra() to the available bytes
...
Fixes: Timeout (27 sec -> 39 milli sec)
Fixes: 13151/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QPEG_fuzzer-5717536023248896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b819472995
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
7cc9a20791
avcodec/aic: Check remaining bits in aic_decode_coeffs()
...
Fixes: Timeout (78 seconds -> 2 seconds)
Fixes: 13186/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AIC_fuzzer-5639516533030912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 951bb7632f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
98fa61c020
avcodec/gdv: Check for truncated tags in decompress_5()
...
Testcase: 13169/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5666354038833152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5cf42f65b6
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
6abc6acd50
avcodec/bethsoftvideo: Check block_type
...
Fixes: Timeout (17 seconds -> 1 second)
Fixes: 13184/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BETHSOFTVID_fuzzer-5711446296494080
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b8ecadec05
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
7a25b3192d
avcodec/jpeg2000dwt: Fix integer overflow in dwt_decode97_int()
...
Fixes: runtime error: signed integer overflow: 2147483598 + 128 cannot be represented in type 'int'
Fixes: 12926/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5705100733972480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4801eea0d4
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
902c96ae16
avcodec/error_resilience: Use a symmetric check for skipping MV estimation
...
This speeds up the testcase by a factor of 4
Fixes: Timeout
Fixes: 13100/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5767533905313792
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e4289cb253
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
49f8873f8b
avcodec/mlpdec: Insuffient typo
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit fc32e08941
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
edf0297c61
avcodec/zmbv: obtain frame later
...
The frame is not needed that early so obtaining it later avoids
the costly operation in case other checks fail.
Fixes: Timeout (14sec -> 4sec)
Fixes: 13140/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-5738330308739072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 177b40890c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
3891dbf4cf
avcodec/jvdec: Check available input space before decode8x8()
...
Fixes: Timeout (78 sec -> 15 millisec)
Fixes: 13147/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JV_fuzzer-5727107827630080
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 61523683c5
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
8ddad9f9cd
avcodec/h264_direct: Fix overflow in POC comparission
...
Fixes: runtime error: signed integer overflow: 2147421862 - -33624063 cannot be represented in type 'int'
Fixes: 12885/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5733516975800320
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5ccf296e74
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
1613b1669d
avformat/webmdashenc: Check id in adaption_sets
...
Fixes: out of array access
Found-by: Wenxiang Qian
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b687b549aa
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Wenxiang Qian
3b4630c181
avformat/http: Fix Out-of-Bounds access in process_line()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 85f91ed760
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Wenxiang Qian
e62abf9398
avformat/ftp: Fix Out-of-Bounds Access and Information Leak in ftp.c:393
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a142ffdcae
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Kevin Backhouse via RT
e2ae3419ff
avcodec/htmlsubtitles: Fixes denial of service due to use of sscanf in inner loop for handling braces
...
Fixes: [Semmle Security Reports #19439 ]
Fixes: dos_sscanf2.mkv
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 894995c41e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Kevin Backhouse via RT
9191218d11
avcodec/htmlsubtitles: Fixes denial of service due to use of sscanf in inner loop for tag scaning
...
Fixes: [Semmle Security Reports #19438 ]
Fixes: dos_sscanf1.mkv
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1f00c97bc3
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
f906710870
avformat/matroskadec: Do not leak queued packets on sync errors
...
Fixes: memleak
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5649187601121280
Reported-by: Chris Cunningham <chcunningham@google.com >
Tested-by: Chris Cunningham <chcunningham@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d1afa7284c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
3ae6063f5a
avformat/mov: Do not use reference stream in mov_read_sidx() if there is no reference stream
...
Fixes: NULL pointer dereference
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5634316373721088
Reported-by: Chris Cunningham <chcunningham@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b0d8b7cb8e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
80603682ff
avcodec/sbrdsp_fixed.c: remove input value limit for sbr_sum_square_c()
...
Fixes: 1377/clusterfuzz-testcase-minimized-5487049807233024
Fixes: assertion failure in sbr_sum_square_c()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4cde7e62db
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
chcunningham
08b159fd0d
avformat/mov: validate chunk_count vs stsc_data
...
Bad content may contain stsc boxes with a first_chunk index that
exceeds stco.entries (chunk_count). This ammends the existing check to
include cases where chunk_count == 0. It also patches up the case
when stsc refers to unknown chunks, but stts has no samples (so we
can simply ignore stsc).
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1c15449ca9
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
chcunningham
0063964f84
avformat/mov.c: require tfhd to begin parsing trun
...
Detecting missing tfhd avoids re-using tfhd track info from the previous
moof. For files with multiple tracks, this may make a mess of the
avindex and fragindex, which can later trigger av_assert0 in
mov_read_trun().
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3ea87e5d9e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
4946bda473
avcodec/pgssubdec: Check for duplicate display segments
...
In such a duplication the previous gets overwritten and leaks
Fixes: memleak
Fixes: 12510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGSSUB_fuzzer-5694439226343424
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e35c3d887b
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
136ec39a2f
avformat/rtsp: Check number of streams in sdp_parse_line()
...
Fixes: OOM
Found-by: Michael Hanselmann <public@hansmi.ch >
Reviewed-by: Michael Hanselmann <public@hansmi.ch >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 497c9b0cce
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
d3aab63320
avformat/rtsp: Clear reply in every iteration in ff_rtsp_connect()
...
Fixes: Infinite loop
Found-by: Michael Hanselmann <public@hansmi.ch >
Reviewed-by: Michael Hanselmann <public@hansmi.ch >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0b50f27635
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00
Michael Niedermayer
ae4148b895
avcodec/fic: Check that there is input left in fic_decode_block()
...
Fixes: Timeout
Fixes: 12450/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-5661984622641152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit db1c4acd02
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:38:51 +01:00