1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

95212 Commits

Author SHA1 Message Date
Michael Niedermayer
9b533de28e avcodec/wmaprodec: Check if there is a stream
Fixes: null pointer dereference
Fixes: signed integer overflow: 512 * 2147483647 cannot be represented in type 'int'
Fixes: 17809/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5634409947987968

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>
2019-10-03 19:37:10 +02:00
Andreas Rheinhardt
be0d3a2df1 avformat/aiffenc: Remove wrong and redundant check
The check "if (!pb->seekable & AVIO_SEEKABLE_NORMAL)" is wrong, because
! has higher precendence than &. But it is also redundant, because this
part of the code is only ever reached when the AVIO_SEEKABLE_NORMAL flag
is set for pb. So simply remove the check.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-03 19:34:23 +02:00
Andreas Rheinhardt
c694fc5759 avformat/aiffenc: Fix potential memleak upon failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-03 19:34:23 +02:00
Andreas Rheinhardt
c548b0a4c6 avformat/aiffenc: Use standard packet list functions
Up until now, aiffenc didn't rely on the standard functions for adding
an element to a linked list and freeing the list, but instead
reimplemented them. This has been changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-03 19:34:23 +02:00
Paul B Mahol
93ea21f9b7 doc/filters: fix typo 2019-10-03 17:58:46 +02:00
Paul B Mahol
d0189f8d97 avfilter/vsrc_sierpinski: add triangle type 2019-10-03 14:21:39 +02:00
Paul B Mahol
22f3b6286e avfilter: add av_cold where it is missing 2019-10-03 12:09:07 +02:00
Paul B Mahol
8ca89e52df avfilter/f_streamselect: fix memleaks of pad names 2019-10-03 11:23:23 +02:00
Paul B Mahol
d492907e78 avfilter/af_amix: fix filtering if specified weights are negative 2019-10-03 10:27:56 +02:00
Paul B Mahol
2a546fb7d5 avfilter/setpts: switch to activate
Also properly handle EOF timestamps.
Fixes #6833.
2019-10-02 21:05:25 +02:00
Michael Niedermayer
61dd2e07be avcodec/g2meet: Check for end of input in jpg_decode_block()
Fixes: Timeout (100sec -> 0.7sec)
Fixes: 8668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5174143888130048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-02 14:49:04 +02:00
Michael Niedermayer
9c84c162e9 avcodec/g2meet: Check if adjusted pixel was on the stack
This basically checks if a pixel that was coded with prediction
and residual could have been stored using a previous case.
This avoids basically a string of 0 symbols stored in less than
50 bytes to hit a O(n²) codepath.

Fixes: Timeout (too slow to wait -> immediately)
Fixes: 8668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-4895946310680576

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-02 14:49:04 +02:00
Paul B Mahol
9847380f5f avfilter/vf_elbg: stop leaking frame on error 2019-10-02 10:54:45 +02:00
Michael Niedermayer
c4de49edc4 avformat/electronicarts: If no packet has been read at the end do not treat it as if theres a packet
Fixes: Assertion failure
Fixes: 17770/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5700606668308480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-01 22:16:20 +02:00
Carl Eugen Hoyos
87b7e141a6 lavc/x264: Use FF_CODEC_CAP_INIT_THREADSAFE if x264 is new.
Usage of strtok() was removed from x264, see also b02490a4
2019-10-01 22:07:11 +02:00
Carl Eugen Hoyos
7ffa458d60 lavfi/movie: Use filter thread count for decoding threads.
Fixes ticket #7542.
2019-10-01 21:54:53 +02:00
Lou Logan
61b7676bd5 cmdutils: trailing options may be ignored
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: mypopy <mypopy@gmail.com>
2019-10-01 10:43:37 -08:00
Paul B Mahol
1b2ed0c392 avfilter/vf_drawbox: implement process_command 2019-10-01 20:28:11 +02:00
Paul B Mahol
027a53dc49 avfilter/vf_drawbox: reduce code duplication 2019-10-01 20:28:11 +02:00
Carl Eugen Hoyos
a650e8c8e9 lavf/avio: Print https warning also for avio_find_protocol_name().
Helps to fix ticket #8197.
2019-10-01 19:52:47 +02:00
Paul B Mahol
3bb170e530 avfilter/f_streamselect: add check case when nothing is done
Fixes #7955.
2019-10-01 18:46:20 +02:00
Paul B Mahol
f66458cfc7 avfilter/vsink_nullsink: cosmetics 2019-10-01 14:57:41 +02:00
Paul B Mahol
94b155e49b avfilter/copy: add forgotten check 2019-10-01 14:55:43 +02:00
Paul B Mahol
9cee8975c3 avfilter/asink_anullsink: cosmetics 2019-10-01 14:38:58 +02:00
Paul B Mahol
a9500441a7 avfilter/vf_copy: check for error cases and handle them 2019-10-01 13:45:29 +02:00
Paul B Mahol
c9473229c9 avfilter/af_acopy: check for error cases and handle them 2019-10-01 13:42:18 +02:00
Paul B Mahol
835fdf48e5 avfilter/vf_showpalette: fix small cosmetics issue 2019-10-01 13:24:35 +02:00
Paul B Mahol
5868e7f562 avfilter/vf_alphamere: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
2019-10-01 13:17:43 +02:00
Michael Niedermayer
97450d2b6a avcodec/dxv: Check op_offset in dxv_decompress_yo()
Fixes: signed integer overflow: -2147483648 - 8 cannot be represented in type 'int'
Fixes: 17745/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5734628463214592

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>
2019-09-30 22:44:43 +02:00
Michael Niedermayer
75fefb1fb7 avcodec/utils: Check sample_rate before opening the decoder
Fixes: signed integer overflow: 2 * -1306460384 cannot be represented in type 'int'
Fixes: 17685/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_fuzzer-5747390337777664
Fixes: 17688/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5739287210885120
Fixes: 17699/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5678394531905536
Fixes: 17738/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5763415733174272
Fixes: 17746/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINKAUDIO_RDFT_fuzzer-5703008159006720

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>
2019-09-30 22:44:43 +02:00
Michael Niedermayer
675f62a202 avcodec/aptx: Fix multiple shift anomalies
Fixes: left shift of negative value -24576
Fixes: 17719/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APTX_fuzzer-5710508002377728

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>
2019-09-30 22:44:43 +02:00
Paul B Mahol
056bc9393e avfilter/vf_photosensitivity: fix memleak 2019-09-30 20:37:25 +02:00
Vladimir Panteleev
c888adf590 libavfilter: add photosensitivity filter 2019-09-30 20:21:27 +02:00
Paul B Mahol
a746359ede avfilter: add scroll video filter 2019-09-30 19:37:37 +02:00
Paul B Mahol
5161b279d6 avfilter/af_join: cosmetics 2019-09-30 16:52:52 +02:00
Paul B Mahol
7851e2f368 avfilter/af_join: use av_asprintf() 2019-09-30 16:45:31 +02:00
Paul B Mahol
6e9e14e62e avfilter/split: use av_asprintf() 2019-09-30 16:39:39 +02:00
Paul B Mahol
8b36968ef4 avfilter/trim: drop all audio frames instead of asserting 2019-09-30 12:58:06 +02:00
Paul B Mahol
a6e2cf5eb0 avfilter/f_metadata: do not memleak expr 2019-09-30 12:24:06 +02:00
Paul B Mahol
9c9d5bf257 avfilter/f_metadata: add ends_with() function for comparing ends of strings 2019-09-30 12:14:34 +02:00
Jun Zhao
6ca3d34ff8 lavf/utils: support duration estimate method dump
add new function duration_estimate_name to dump duration estimate
method, it's will help to debug some duration issue.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-30 10:08:45 +08:00
Jun Zhao
f5e867570e lavf/utils: Cosmetics: fix indentation for estimate_timings
fix indentation for estimate_timings when dump start_time/duartion.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-30 10:08:27 +08:00
Jun Zhao
541c635628 lavf/utils: correct the duration estimation method for nut demuxer
in fact, nut demuxer use the PTS for duration estimation.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-30 10:08:16 +08:00
Jun Zhao
12e6057fb0 lavf/nutdec: add logging context to log
Add logging context to log, it's will help debuging.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-30 10:06:21 +08:00
Jun Zhao
79597639cb lavf/utils: change the log level to warning if can't get duration
change the log level to warning if can't get duration, it's will help
to debug some duration issue

Signed-off-by: vacingfang <vacingfang@tencent.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-30 10:06:09 +08:00
Michael Niedermayer
47b0d0812e tools/target_dec_fuzzer: Adjust VP7 threshold
Fixes: Timeout (110sec -> 10sec)
Fixes: 17705/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5765834135306240

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-29 22:18:58 +02:00
Paul B Mahol
f1e17eb446 avcodec/qtrleenc: fix undefined behaviour
Fixes #7991.
2019-09-29 21:05:35 +02:00
Paul B Mahol
4a51075f4d doc/examples/muxing: fix underflow in duration of encoded streams
Now they are exactly 10 seconds long.

Fixes #5684.
2019-09-29 20:41:29 +02:00
Andreas Rheinhardt
1929dd4eff avcodec/cbs_av1: Make overread check more robust
When performing a comparison of a signed int and an unsigned int, the
signed int is first converted to an unsigned int, so that negative
values are being treated as big, positive values. This can become a
problem in an overread check, namely when an overread already happened.
So change the type of the variable containing the amount of bits that
need to be left to signed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-09-29 17:48:40 +01:00
Andreas Rheinhardt
f3333c3c67 avcodec/cbs_h2645: Fix potential out-of-bounds array access
The maximum allowed index for an array access is FF_ARRAY_ELEMS - 1; yet
the current code allowed FF_ARRAY_ELEMS. This wasn't dangerous in practice,
as parameter sets with invalid ids were already filtered out during
reading.

Found via PVS-Studio (see ticket #8156).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-09-29 17:48:38 +01:00