ffmpeg.git
2 years agoavformat: add Gremlin Digital Video demuxer
Paul B Mahol [Fri, 2 Jun 2017 09:28:35 +0000 (11:28 +0200)]
avformat: add Gremlin Digital Video demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec: add Gremlin Digital Video decoder
Paul B Mahol [Fri, 2 Jun 2017 10:52:07 +0000 (12:52 +0200)]
avcodec: add Gremlin Digital Video decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec: add Gremlin DPCM decoder
Paul B Mahol [Fri, 2 Jun 2017 10:43:02 +0000 (12:43 +0200)]
avcodec: add Gremlin DPCM decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/tiff: Fix leak of geotags[].val
Michael Niedermayer [Sat, 10 Jun 2017 23:05:26 +0000 (01:05 +0200)]
avcodec/tiff: Fix leak of geotags[].val

Fixes: 2176/clusterfuzz-testcase-minimized-5908197216878592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/fft_template: Fix multiple runtime error: signed integer overflow: -194391871...
Michael Niedermayer [Sat, 27 May 2017 10:21:25 +0000 (12:21 +0200)]
avcodec/fft_template: Fix multiple runtime error: signed integer overflow: -1943918714 - 1935113003 cannot be represented in type 'int'

Fixes: 1735/clusterfuzz-testcase-minimized-5350472347025408

This uses unsigned instead of SUINT because the later was rejected by multiple developers
See: [FFmpeg-devel] [PATCH] avcodec/fft_template: Fix multiple runtime error: signed integer overflow: -1943918714 - 1935113003 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ra144: Fix runtime error: signed integer overflow: -2200 * 1033073 cannot...
Michael Niedermayer [Sat, 10 Jun 2017 22:45:20 +0000 (00:45 +0200)]
avcodec/ra144: Fix runtime error: signed integer overflow: -2200 * 1033073 cannot be represented in type 'int'

Fixes: 2175/clusterfuzz-testcase-minimized-5809657849315328

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/flicvideo: Fix runtime error: signed integer overflow: 4864 * 459296 cannot...
Michael Niedermayer [Sat, 10 Jun 2017 17:43:25 +0000 (19:43 +0200)]
avcodec/flicvideo: Fix runtime error: signed integer overflow: 4864 * 459296 cannot be represented in type 'int'

Fixes: 2174/clusterfuzz-testcase-minimized-5739234533048320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cfhd: Check band parameters before storing them
Michael Niedermayer [Sat, 10 Jun 2017 16:45:08 +0000 (18:45 +0200)]
avcodec/cfhd: Check band parameters before storing them

Fixes out of array read
Fixes: 2169/clusterfuzz-testcase-minimized-5688641642823680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agofate: add test for -time_base option
Michael Bradshaw [Fri, 9 Jun 2017 22:02:27 +0000 (15:02 -0700)]
fate: add test for -time_base option

Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h264_parse: Check picture structure when initializing weight table
Michael Niedermayer [Fri, 9 Jun 2017 22:13:07 +0000 (00:13 +0200)]
avcodec/h264_parse: Check picture structure when initializing weight table

Fixes: runtime error: index 49 out of bounds for type 'int [48][2][2]'
Fixes: 2159/clusterfuzz-testcase-minimized-5267945972301824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/dvbsubdec: Check pixel buffer size constraint from ETSI EN 300 743 V1.3.1
Michael Niedermayer [Fri, 9 Jun 2017 21:16:55 +0000 (23:16 +0200)]
avcodec/dvbsubdec: Check pixel buffer size constraint from ETSI EN 300 743 V1.3.1

Fixes: OOM
Fixes: 2143/clusterfuzz-testcase-minimized-5482288060039168

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/dvbsubdec: Use av_image_check_size2()
Michael Niedermayer [Fri, 9 Jun 2017 21:04:30 +0000 (23:04 +0200)]
avcodec/dvbsubdec: Use av_image_check_size2()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/mov.c: offset index timestamps by the minimum pts to make first pts zero
Sasi Inguva [Tue, 6 Jun 2017 18:16:01 +0000 (11:16 -0700)]
lavf/mov.c: offset index timestamps by the minimum pts to make first pts zero

If the videos starts with B frame, then the minimum composition time
as computed by stts + ctts will be non-zero. Hence we need to shift
the DTS, so that the first pts is zero. This was the intention of that
code-block. However it was subtracting by the wrong amount.

For example, for one of the videos in the bug nonFormatted.mp4 we have

stts:
sample_count  duration
960           1001

ctts:
sample_count  duration
1             3003
2             0
1             3003
....

The resulting composition times are :  3003, 1001, 2002, 6006, ...

The minimum composition time or PTS is 1001, which should be used to
offset DTS. However the code block was wrongly using ctts[0] which is
3003. Hence the PTS was negative. This change computes the minimum pts
encountered while fixing the index, and then subtracts it from all the
timestamps after the edit list fixes are applied.

Samples files available from:

https://bugs.chromium.org/p/chromium/issues/detail?id=721451
https://bugs.chromium.org/p/chromium/issues/detail?id=723537

fate-suite/h264/twofields_packet.mp4 is a similar file starting with 2
B frames. Before this change the PTS of first two B-frames was -6006
and -3003, and I am guessing one of them got dropped when being decoded
and remuxed  to the framecrc before, and now it is not being dropped.

Signed-off-by: Sasi Inguva <isasi@google.com>
2 years agovf_colorspace: Add a pixdesc API alias name for bt2020nc color space
Vittorio Giovara [Fri, 9 Jun 2017 00:00:19 +0000 (20:00 -0400)]
vf_colorspace: Add a pixdesc API alias name for bt2020nc color space

2 years agox86inc: Remove argument from WIN64_RESTORE_XMM
Anton Mitrofanov [Sat, 20 May 2017 18:17:59 +0000 (21:17 +0300)]
x86inc: Remove argument from WIN64_RESTORE_XMM

The use of rsp was pretty much hardcoded there and probably didn't work
otherwise with stack_size > 0.

2 years agox86inc: Prefer r14/r15 over r12/r13 on x86-64
Henrik Gramner [Sat, 22 Apr 2017 18:30:35 +0000 (20:30 +0200)]
x86inc: Prefer r14/r15 over r12/r13 on x86-64

Due to a peculiarity in the ModR/M addressing encoding, the r12 and r13
registers sometimes requires an additional byte when used as a base register.

r14 and r15 doesn't have that issue, so prefer using them.

2 years agox86inc: Make REP_RET identical to RET in SSSE3+ functions
Henrik Gramner [Thu, 20 Apr 2017 17:16:51 +0000 (19:16 +0200)]
x86inc: Make REP_RET identical to RET in SSSE3+ functions

There's no point in emitting a rep prefix before ret on modern CPUs.

2 years agox86inc: Fix call with memory operands
Henrik Gramner [Wed, 29 Mar 2017 14:43:57 +0000 (16:43 +0200)]
x86inc: Fix call with memory operands

We overload the `call` instruction with a macro, but it would misbehave when
the macro argument wasn't a valid identifier. Fix it by explicitly checking
if the argument is an identifier.

2 years agolibavformat/http: return EIO when ffurl_read return 0, but s->off < target_end
raymondzheng [Thu, 18 May 2017 06:35:31 +0000 (14:35 +0800)]
libavformat/http: return EIO when ffurl_read return 0, but s->off < target_end

Approved-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/af_sofalizer: switch to libmysofa
Paul B Mahol [Fri, 2 Jun 2017 23:39:04 +0000 (01:39 +0200)]
avfilter/af_sofalizer: switch to libmysofa

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolavc: add mpeg2 mediacodec decoder
Aman Gupta [Mon, 5 Jun 2017 20:22:58 +0000 (16:22 -0400)]
lavc: add mpeg2 mediacodec decoder

Android TV and FireOS hardware supports mpeg2 hardware decoding via
MediaCodec.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2 years agoavcodec/indeo4: Check remaining data in Pic hdr extension parsing code
Michael Niedermayer [Thu, 8 Jun 2017 11:58:47 +0000 (13:58 +0200)]
avcodec/indeo4: Check remaining data in Pic hdr extension parsing code

Fixes: Timeout
Fixes: 2115/clusterfuzz-testcase-minimized-6594111748440064

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ac3dec_fixed: Fix multiple runtime error: signed integer overflow: -39271008...
Michael Niedermayer [Thu, 8 Jun 2017 11:44:32 +0000 (13:44 +0200)]
avcodec/ac3dec_fixed: Fix multiple runtime error: signed integer overflow: -39271008 * 59 cannot be represented in type 'int'

Fixes: 2113/clusterfuzz-testcase-minimized-6510704959946752

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agovf_colorspace: Add support for jedec p22 primaries
Vittorio Giovara [Wed, 30 Nov 2016 18:16:25 +0000 (13:16 -0500)]
vf_colorspace: Add support for jedec p22 primaries

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agovf_colorspace: Add support for smpte248 color primaries
Vittorio Giovara [Wed, 7 Jun 2017 19:03:14 +0000 (15:03 -0400)]
vf_colorspace: Add support for smpte248 color primaries

2 years agoMAINTAINERS: Add Manojkumar Bhosale for MIPS, remove myself.
Nedeljko Babic [Wed, 7 Jun 2017 13:25:51 +0000 (15:25 +0200)]
MAINTAINERS: Add Manojkumar Bhosale for MIPS, remove myself.

Manojkumar is taking over MIPS maintenance.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agox86/aacpsdsp: fix output of ff_ps_stereo_interpolate_ipdopd_sse3
James Almer [Wed, 7 Jun 2017 16:53:31 +0000 (13:53 -0300)]
x86/aacpsdsp: fix output of ff_ps_stereo_interpolate_ipdopd_sse3

The fate-aac-al_sbr_ps_04_ur test did not detect this mistake.

2 years agolavf: consider codec framerate for framerate detection
wm4 [Tue, 23 May 2017 11:36:38 +0000 (13:36 +0200)]
lavf: consider codec framerate for framerate detection

Fixes detection of some TV sample as 24.5 FPS. With the patch applied,
it's detected as 25 FPS.

This is enabled for mpegts only.

2 years agovorbisenc: Fix memory leak on errors
Tyler Jones [Tue, 6 Jun 2017 14:06:38 +0000 (08:06 -0600)]
vorbisenc: Fix memory leak on errors

Switches temporary samples for processing to be stored in the encoder's
context, avoids memory leaks if any errors occur while encoding a frame.

Fixes CID1412026

Signed-off-by: Tyler Jones <tdjones879@gmail.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agolibavutil/eval: Add round function to expression parser
Kevin Mark [Tue, 6 Jun 2017 04:43:13 +0000 (00:43 -0400)]
libavutil/eval: Add round function to expression parser

We have floor, ceil, and trunc. Let's add round.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/utils: Slightly un-clutter code in determinable_frame_size() by using a...
Michael Niedermayer [Sun, 4 Jun 2017 00:25:46 +0000 (02:25 +0200)]
avformat/utils: Slightly un-clutter code in determinable_frame_size() by using a switch

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agovf_colorspace: Add support for gbr color space
Vittorio Giovara [Mon, 5 Jun 2017 20:05:11 +0000 (16:05 -0400)]
vf_colorspace: Add support for gbr color space

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agoavcodec/mpeg4videodec: Fix runtime error: signed integer overflow: 53098 * 40448...
Michael Niedermayer [Tue, 6 Jun 2017 14:28:57 +0000 (16:28 +0200)]
avcodec/mpeg4videodec: Fix runtime error: signed integer overflow: 53098 * 40448 cannot be represented in type 'int'

Fixes: 2106/clusterfuzz-testcase-minimized-6136503639998464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/pafvideo: Fix assertion failure
Michael Niedermayer [Tue, 6 Jun 2017 14:21:37 +0000 (16:21 +0200)]
avcodec/pafvideo: Fix assertion failure

Fixes: 2100/clusterfuzz-testcase-minimized-4522961547558912

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/takdec: Fix multiple runtime error: signed integer overflow: 637072 * 4096...
Michael Niedermayer [Tue, 6 Jun 2017 14:01:16 +0000 (16:01 +0200)]
avcodec/takdec: Fix multiple runtime error: signed integer overflow: 637072 * 4096 cannot be represented in type 'int'

Fixes: 2079/clusterfuzz-testcase-minimized-5345861779324928

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavcodec/vp9: ipred_dl_32x32_16 avx2 implementation
Ilia Valiakhmetov [Sun, 4 Jun 2017 17:52:27 +0000 (00:52 +0700)]
libavcodec/vp9: ipred_dl_32x32_16 avx2 implementation

vp9_diag_downleft_32x32_8bpp_c: 580.2
vp9_diag_downleft_32x32_8bpp_sse2: 75.6
vp9_diag_downleft_32x32_8bpp_ssse3: 73.7
vp9_diag_downleft_32x32_8bpp_avx: 72.7
vp9_diag_downleft_32x32_10bpp_c: 1101.2
vp9_diag_downleft_32x32_10bpp_sse2: 145.4
vp9_diag_downleft_32x32_10bpp_ssse3: 137.5
vp9_diag_downleft_32x32_10bpp_avx: 134.8
vp9_diag_downleft_32x32_10bpp_avx2: 94.0
vp9_diag_downleft_32x32_12bpp_c: 1108.5
vp9_diag_downleft_32x32_12bpp_sse2: 145.5
vp9_diag_downleft_32x32_12bpp_ssse3: 137.3
vp9_diag_downleft_32x32_12bpp_avx: 135.2
vp9_diag_downleft_32x32_12bpp_avx2: 94.0

~30% faster than avx implementation

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2 years agolavc/mpegvideo_enc: allow low_delay for non MPEG2 codecs depending on strict_std_comp...
Stefano Sabatini [Tue, 23 May 2017 10:22:41 +0000 (12:22 +0200)]
lavc/mpegvideo_enc: allow low_delay for non MPEG2 codecs depending on strict_std_compliance

Forcing low_delay can be useful, even if not officially supported.

2 years agofate: add fate-adts-id3v1-demux
James Almer [Mon, 5 Jun 2017 23:21:24 +0000 (20:21 -0300)]
fate: add fate-adts-id3v1-demux

This test the demuxer discarding non ADTS frames at the beginning and
end of the input.

As a side effect, this commit also enables fate-adts-demux, which was
accidentally disabled in 324f0fbff1245f9e9e1dda29ecb03138a2de287d.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/mjpegdec: Check that reference frame matches the current frame
Michael Niedermayer [Mon, 5 Jun 2017 20:23:15 +0000 (22:23 +0200)]
avcodec/mjpegdec: Check that reference frame matches the current frame

Fixes: out of array read
Fixes: 2097/clusterfuzz-testcase-minimized-5036861833609216

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/tiff: Avoid loosing allocated geotag values
Michael Niedermayer [Mon, 5 Jun 2017 18:39:21 +0000 (20:39 +0200)]
avcodec/tiff: Avoid loosing allocated geotag values

Fixes memleak
Fixes: 2076/clusterfuzz-testcase-minimized-6542640243802112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cavs: Fix runtime error: signed integer overflow: -12648062 * 256 cannot...
Michael Niedermayer [Mon, 5 Jun 2017 17:33:56 +0000 (19:33 +0200)]
avcodec/cavs: Fix runtime error: signed integer overflow: -12648062 * 256 cannot be represented in type 'int'

Fixes: 2067/clusterfuzz-testcase-minimized-5578430902960128

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffprobe: Use pixdesc API to provide color space names
Vittorio Giovara [Thu, 1 Jun 2017 19:18:37 +0000 (15:18 -0400)]
ffprobe: Use pixdesc API to provide color space names

This API is more up-to-date, provides names compatible with filters
and external encoders, and is consistent with the other color
property variables.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agovorbisenc: signal samples to skip
Rostislav Pehlivanov [Mon, 5 Jun 2017 15:51:08 +0000 (16:51 +0100)]
vorbisenc: signal samples to skip

The encoder never actually signalled how many samples to skip.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavcodec/vorbisenc: Use a bufqueue in encoding with smaller lengths
Tyler Jones [Tue, 30 May 2017 17:28:16 +0000 (11:28 -0600)]
avcodec/vorbisenc: Use a bufqueue in encoding with smaller lengths

Switching the vorbis encoder to use a buffer queue for input frames allows
saving lookahead samples more easily and safely for psychoacoustic systems,
requiring less pointer arithmetic in the case of transient windows.

2 years agoavcodec/vorbisenc: Include bufqueue and afqueue
Tyler Jones [Tue, 30 May 2017 17:28:04 +0000 (11:28 -0600)]
avcodec/vorbisenc: Include bufqueue and afqueue

2 years agoavcodec/vorbisenc: Use fdsp for applying windows
Tyler Jones [Tue, 30 May 2017 15:14:36 +0000 (09:14 -0600)]
avcodec/vorbisenc: Use fdsp for applying windows

Using fdsp improves readability and allows using architecture-specific
optimizations.

Signed-off-by: Tyler Jones <tdjones879@gmail.com>
2 years agoavcodec/vorbisenc: Include fdsp
Tyler Jones [Tue, 30 May 2017 15:14:17 +0000 (09:14 -0600)]
avcodec/vorbisenc: Include fdsp

Signed-off-by: Tyler Jones <tdjones879@gmail.com>
2 years agoavformat/hls: Check local file extensions
Michael Niedermayer [Sat, 3 Jun 2017 19:20:04 +0000 (21:20 +0200)]
avformat/hls: Check local file extensions

This reduces the attack surface of local file-system
information leaking.

It prevents the existing exploit leading to an information leak. As
well as similar hypothetical attacks.

Leaks of information from files and symlinks ending in common multimedia extensions
are still possible. But files with sensitive information like private keys and passwords
generally do not use common multimedia filename extensions.
It does not stop leaks via remote addresses in the LAN.

The existing exploit depends on a specific decoder as well.
It does appear though that the exploit should be possible with any decoder.
The problem is that as long as sensitive information gets into the decoder,
the output of the decoder becomes sensitive as well.
The only obvious solution is to prevent access to sensitive information. Or to
disable hls or possibly some of its feature. More complex solutions like
checking the path to limit access to only subdirectories of the hls path may
work as an alternative. But such solutions are fragile and tricky to implement
portably and would not stop every possible attack nor would they work with all
valid hls files.

Developers have expressed their dislike / objected to disabling hls by default as well
as disabling hls with local files. There also where objections against restricting
remote url file extensions. This here is a less robust but also lower
inconvenience solution.
It can be applied stand alone or together with other solutions.
limiting the check to local files was suggested by nevcairiel

This recommits the security fix without the author name joke which was
originally requested by Nicolas.

Found-by: Emil Lerner and Pavel Cheremushkin
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoRevert "avformat/hls: Check local file extensions"
Michael Niedermayer [Mon, 5 Jun 2017 11:24:36 +0000 (13:24 +0200)]
Revert "avformat/hls: Check local file extensions"

Requested-by: Paul B Mahol <onemda@gmail.com>
This reverts commit caf7d6178a4d5f24c915da48410a9790b21703aa.

2 years agofate: add test for the Dirac low delay profile
Rostislav Pehlivanov [Sun, 4 Jun 2017 17:03:05 +0000 (18:03 +0100)]
fate: add test for the Dirac low delay profile

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agox86/aacpsdsp: optimize ff_ps_mul_pair_single_sse
James Almer [Mon, 5 Jun 2017 02:29:56 +0000 (23:29 -0300)]
x86/aacpsdsp: optimize ff_ps_mul_pair_single_sse

~2% faster.

2 years agoavformat/hls: Check local file extensions
Sysiphus [Sat, 3 Jun 2017 19:20:04 +0000 (21:20 +0200)]
avformat/hls: Check local file extensions

This reduces the attack surface of local file-system
information leaking.

It prevents the existing exploit leading to an information leak. As
well as similar hypothetical attacks.

Leaks of information from files and symlinks ending in common multimedia extensions
are still possible. But files with sensitive information like private keys and passwords
generally do not use common multimedia filename extensions.
It does not stop leaks via remote addresses in the LAN.

The existing exploit depends on a specific decoder as well.
It does appear though that the exploit should be possible with any decoder.
The problem is that as long as sensitive information gets into the decoder,
the output of the decoder becomes sensitive as well.
The only obvious solution is to prevent access to sensitive information. Or to
disable hls or possibly some of its feature. More complex solutions like
checking the path to limit access to only subdirectories of the hls path may
work as an alternative. But such solutions are fragile and tricky to implement
portably and would not stop every possible attack nor would they work with all
valid hls files.

Developers have expressed their dislike / objected to disabling hls by default as well
as disabling hls with local files. There also where objections against restricting
remote url file extensions. This here is a less robust but also lower
inconvenience solution.
It can be applied stand alone or together with other solutions.
limiting the check to local files was suggested by nevcairiel

Found-by: Emil Lerner and Pavel Cheremushkin
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoFATE: Add test for libavfilter/scale2ref
Kevin Mark [Sun, 4 Jun 2017 07:53:31 +0000 (03:53 -0400)]
FATE: Add test for libavfilter/scale2ref

This new FATE test for the scale2ref filter makes use of the recently
added scale2ref-specific variables to maintain the aspect ratio of a
test input.

Filtergraph explanation:
[main] has an AR of 4:3. [ref] has an AR of 16:9.
640 / 4 = 160. So the new width for [main] is 160.
160 / ((320 / 240) * (1 / 1)) = 160 / (4 / 3) = 120. So the new
height for [main] is 120.
160 / 120 = 4 / 3 so [main]'s aspect ratio has been maintained while
using [ref]'s width as a reference point.

[ref] is nullsink'd since it is left unchanged by scale2ref (and so
shouldn't need to be tested).

If we were to use "iw/4:-1" in place of "iw/4:ow/mdar":
640 / 4 = 160. So the new width for [main] would be 160.
360 / 4 = 90. So the new height for [main] would be 90.
160 / 90 = 16 / 9 so [main] now has the same aspect ratio as [ref]
which is probably what you do not want.

This is currently the only test for scale2ref.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/qdrw: Fix null pointer dereference
Michael Niedermayer [Sun, 4 Jun 2017 19:37:47 +0000 (21:37 +0200)]
avcodec/qdrw: Fix null pointer dereference

The RGB555 PACKBITSRGN case tries to read a palette, if such
palette is actually stored then it accesses a null pointer.
All 16bit samples i could find use DIRECTBITSRGN.

Fixes: 2065/clusterfuzz-testcase-minimized-6298930457346048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/sbrdsp_fixed: Fix assertion failure in sbr_sum_square_c()
Michael Niedermayer [Sun, 4 Jun 2017 18:54:44 +0000 (20:54 +0200)]
avcodec/sbrdsp_fixed: Fix assertion failure in sbr_sum_square_c()

This also increases the range of input values supported as well as
decreasing the operation dependencies in the main loop, improving
speed on modern CPUs.

Fixes part of: 2045/clusterfuzz-testcase-minimized-6751255865065472

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavutil/softfloat: Fix sign error in and improve documentation of av_int2sf()
Michael Niedermayer [Sun, 4 Jun 2017 18:45:09 +0000 (20:45 +0200)]
avutil/softfloat: Fix sign error in and improve documentation of av_int2sf()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/af_afftfilt: fix memory leaks
Paul B Mahol [Sun, 4 Jun 2017 20:51:57 +0000 (22:51 +0200)]
avfilter/af_afftfilt: fix memory leaks

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/wavpack: Fix runtime error: signed integer overflow: 2081021665 - -130689706...
Michael Niedermayer [Sun, 4 Jun 2017 15:14:13 +0000 (17:14 +0200)]
avcodec/wavpack: Fix runtime error: signed integer overflow: 2081021665 - -130689706 cannot be represented in type 'int'

Fixes: 2038/clusterfuzz-testcase-minimized-4521466148159488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/hevc_ps: Fix runtime error: index 32 out of bounds for type 'uint8_t [32]'
Michael Niedermayer [Sun, 4 Jun 2017 15:06:27 +0000 (17:06 +0200)]
avcodec/hevc_ps: Fix runtime error: index 32 out of bounds for type 'uint8_t [32]'

Fixes: 2010/clusterfuzz-testcase-minimized-6209288450080768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/dxv: Check remaining bytes in dxv_decompress_raw()
Michael Niedermayer [Sun, 4 Jun 2017 13:41:18 +0000 (15:41 +0200)]
avcodec/dxv: Check remaining bytes in dxv_decompress_raw()

Fixes: Timeout
Fixes: 2006/clusterfuzz-testcase-minimized-5766515037044736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/aacdec: add a custom read_packet function
James Almer [Fri, 2 Jun 2017 23:34:24 +0000 (20:34 -0300)]
avformat/aacdec: add a custom read_packet function

Atempt to read and propagate only full ADTS frames and not other data,
like id3v1 or APETags at the end of the file.

Fixes ticket #6437.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/af_surround: add support for some upmixing of 3.0, 2.1 and 5.1 channel layout
Paul B Mahol [Sat, 3 Jun 2017 20:44:08 +0000 (22:44 +0200)]
avfilter/af_surround: add support for some upmixing of 3.0, 2.1 and 5.1 channel layout

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/utils: change bitrate to int64_t in av_find_best_stream
Marton Balint [Fri, 2 Jun 2017 20:45:02 +0000 (22:45 +0200)]
avformat/utils: change bitrate to int64_t in av_find_best_stream

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/utils: return impaired streams in av_find_best_stream if only those exist
Marton Balint [Fri, 2 Jun 2017 19:52:13 +0000 (21:52 +0200)]
avformat/utils: return impaired streams in av_find_best_stream if only those exist

Fixes ticket #6397.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavcodec/pafvideo: Check packet size and frame code before ff_reget_buffer()
Michael Niedermayer [Sun, 4 Jun 2017 11:38:02 +0000 (13:38 +0200)]
avcodec/pafvideo: Check packet size and frame code before ff_reget_buffer()

Fixes 1745/clusterfuzz-testcase-minimized-6160693365571584
Fixes: Timeout

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ac3dec_fixed: Fix runtime error: left shift of 419 by 23 places cannot be...
Michael Niedermayer [Sun, 4 Jun 2017 11:02:51 +0000 (13:02 +0200)]
avcodec/ac3dec_fixed: Fix runtime error: left shift of 419 by 23 places cannot be represented in type 'int'

Fixes: 1352/clusterfuzz-testcase-minimized-5757565017260032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/tiff: Clear deinvert_buf_size on deallocation
Michael Niedermayer [Sat, 3 Jun 2017 22:25:09 +0000 (00:25 +0200)]
avcodec/tiff: Clear deinvert_buf_size on deallocation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/tiff: Use av_fast_padded_malloc() in tiff_unpack_fax()
Michael Niedermayer [Sat, 3 Jun 2017 21:57:58 +0000 (23:57 +0200)]
avcodec/tiff: Use av_fast_padded_malloc() in tiff_unpack_fax()

Fixes: Timeout
Fixes: 1213/clusterfuzz-testcase-minimized-6022987469815808

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mlpdec: Check quant_step_size against huff_lsbs
Michael Niedermayer [Sat, 20 May 2017 21:01:04 +0000 (23:01 +0200)]
avcodec/mlpdec: Check quant_step_size against huff_lsbs

This reorders the operations so as to avoid computations with the above arguments
before they have been initialized.
Fixes part of 1708/clusterfuzz-testcase-minimized-5035111957397504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/options: log filename on open
Michael Niedermayer [Fri, 2 Jun 2017 12:47:16 +0000 (14:47 +0200)]
avformat/options: log filename on open

The loglevel is choosen so that the main filename and any images of
multi image sequences are shown only at debug level to avoid
clutter.

This makes exploits in playlists more visible. As they would show
accesses to private/sensitive files

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavfilter/scale2ref: Fix out-of-bounds array access
Kevin Mark [Sat, 3 Jun 2017 09:04:19 +0000 (05:04 -0400)]
libavfilter/scale2ref: Fix out-of-bounds array access

ff_scale_eval_dimensions blindly assumes that two inputs are always
available as of 3385989b98be7940044e4f0a6b431a0a00abf2fa. This is
notably not the case when the function is called for the scale
filter. With the scale filter inputs[1] does not exist.

ff_scale_eval_dimensions now has an updated scale2ref check that
makes certain two inputs are actually available before attempting to
access the second one.

Thanks to James Almer for reporting this bug. This should fix the 820
Valgrind tests I single-handedly managed to break.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agox86/aacpsdsp: optimize ff_ps_stereo_interpolate_sse3
James Almer [Fri, 2 Jun 2017 22:17:28 +0000 (19:17 -0300)]
x86/aacpsdsp: optimize ff_ps_stereo_interpolate_sse3

Move the unpacking outside of the loop. 5% to 10% faster.

Suggested-by: ubitux
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/matroskaenc: also write chapters when output is WebM
James Almer [Fri, 2 Jun 2017 02:42:05 +0000 (23:42 -0300)]
avformat/matroskaenc: also write chapters when output is WebM

WebM supports a subset of elements from the Chapters master.
See https://www.webmproject.org/docs/container/#chapters

Addresses ticket #6425

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/aacps: Fix runtime error: left shift of 1073741824 by 1 places cannot be...
Michael Niedermayer [Fri, 2 Jun 2017 20:31:02 +0000 (22:31 +0200)]
avcodec/aacps: Fix runtime error: left shift of 1073741824 by 1 places cannot be represented in type 'INTFLOAT' (aka 'int')

Fixes: 2005/clusterfuzz-testcase-minimized-5744226438479872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/snowdec: Fix runtime error: signed integer overflow: 1404 * 8388608 cannot...
Michael Niedermayer [Fri, 2 Jun 2017 16:13:20 +0000 (18:13 +0200)]
avcodec/snowdec: Fix runtime error: signed integer overflow: 1404 * 8388608 cannot be represented in type 'int'

Fixes: 2004/clusterfuzz-testcase-minimized-5533262866808832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoDisable MSA optimization for big endian arch
Shivraj Patil [Thu, 1 Jun 2017 08:37:19 +0000 (14:07 +0530)]
Disable MSA optimization for big endian arch

The current upstreamed code has been written and tested for Little Endian systems.
We do have plans to add the Big Endian support in near future, but till that time, need to disable all to avoid its usage and failures.

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/nvenc: fix hw accelerated transcode with bframes
Ganapathy Kasi [Wed, 31 May 2017 02:03:14 +0000 (19:03 -0700)]
avcodec/nvenc: fix hw accelerated transcode with bframes

hw accelerated transcode (h264_cuvid -> h264_nvenc with -hwaccel cuvid) was
broken after the filtergraph initialization was changed to intialize decoder
first followed by encoder (commit af1761f7b5b1b72197dc40934953b775c2d951cc).
During initialzing encoder with bframes, local buffers are allocated
internally in encoder which fails since no cuda context is available. Now
pushing the correct cuda context before encoder initialization fixes the issue.
Also adding push/pop cuda ctx during create/destroy/map/unmap resources and
destroy encoder session.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agox86/aacps: add ff_ps_stereo_interpolate_ipdopd_sse3()
James Almer [Tue, 23 May 2017 18:19:39 +0000 (15:19 -0300)]
x86/aacps: add ff_ps_stereo_interpolate_ipdopd_sse3()

About 2x faster than the c version.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agolibavfilter/scale2ref: Add constants for the primary input
Kevin Mark [Tue, 30 May 2017 17:34:29 +0000 (13:34 -0400)]
libavfilter/scale2ref: Add constants for the primary input

Variables pertaining to the main video are now available when
using the scale2ref filter. This allows, as an example, scaling a
video with another as a reference point while maintaining the
original aspect ratio of the primary/non-reference video.

Consider the following graph: scale2ref=iw/6:-1 [main][ref]
This will scale [main] to 1/6 the width of [ref] while maintaining
the aspect ratio. This works well when the AR of [ref] is equal to
the AR of [main] only. What the above filter really does is
maintain the AR of [ref] when scaling [main]. So in all non-same-AR
situations [main] will appear stretched or compressed to conform to
the same AR of the reference video. Without doing this calculation
externally there is no way to scale in reference to another input
while maintaining AR in libavfilter.

To make this possible, we introduce eight new constants to be used
in the w and h expressions only in the scale2ref filter:

 * main_w/main_h: width/height of the main input video
 * main_a: aspect ratio of the main input video
 * main_sar: sample aspect ratio of the main input video
 * main_dar: display aspect ratio of the main input video
 * main_hsub/main_vsub: horiz/vert chroma subsample vals of main
 * mdar: a shorthand alias of main_dar

Of course, not all of these constants are needed for maintaining the
AR, but adding additional constants in line of what is available for
in/out allows for other scaling possibilities I have not imagined.

So to now scale a video to 1/6 the size of another video using the
width and maintaining its own aspect ratio you can do this:

scale2ref=iw/6:ow/mdar [main][ref]

This is ideal for picture-in-picture configurations where you could
have a square or 4:3 video overlaid on a corner of a larger 16:9
feed all while keeping the scaled video in the corner at its correct
aspect ratio and always the same size relative to the larger video.

I've tried to re-use as much code as possible. I could not find a way
to avoid duplication of the var_names array. It must now be kept in
sync with the other (the normal one and the scale2ref one) for
everything to work which does not seem ideal. For every new variable
introduced/removed into/from the normal scale filter one must be
added/removed to/from the scale2ref version. Suggestions on how to
avoid var_names duplication are welcome.

var_values has been increased to always be large enough for the
additional scale2ref variables. I do not forsee this being a problem
as the names variable will always be the correct size. From my
understanding of av_expr_parse_and_eval it will stop processing
variables when it runs out of names even though there may be
additional (potentially uninitialized) entries in the values array.
The ideal solution here would be using a variable-length array but
that is unsupported in C90.

This patch does not remove any functionality and is strictly a
feature patch. There are no API changes. Behavior does not change for
any previously valid inputs.

The applicable documentation has also been updated.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/asvdec: Use rounded up dimenensions in input size check
Michael Niedermayer [Thu, 1 Jun 2017 18:42:30 +0000 (20:42 +0200)]
avcodec/asvdec: Use rounded up dimenensions in input size check

Fixes: Timeout
Fixes: 2001/clusterfuzz-testcase-minimized-6187599389523968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type...
Michael Niedermayer [Thu, 1 Jun 2017 16:48:37 +0000 (18:48 +0200)]
avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type 'int'

Fixes: 1967/clusterfuzz-testcase-minimized-5757031199801344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cfhd: Fix runtime error: signed integer overflow: 65280 * 65288 cannot be...
Michael Niedermayer [Thu, 1 Jun 2017 16:32:52 +0000 (18:32 +0200)]
avcodec/cfhd: Fix runtime error: signed integer overflow: 65280 * 65288 cannot be represented in type 'int'

Fixes: 1925/clusterfuzz-testcase-minimized-5564569688735744

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter: add audio surround upmixer
Paul B Mahol [Fri, 19 May 2017 18:12:04 +0000 (20:12 +0200)]
avfilter: add audio surround upmixer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoffprobe: Print AVContentLightMetadata side data contents
Vittorio Giovara [Wed, 31 May 2017 15:55:11 +0000 (11:55 -0400)]
ffprobe: Print AVContentLightMetadata side data contents

2 years agoffprobe: Print AVMasteringDisplayMetadata side data contents
Vittorio Giovara [Tue, 30 May 2017 21:28:11 +0000 (17:28 -0400)]
ffprobe: Print AVMasteringDisplayMetadata side data contents

2 years agocheckasm: add _fixed suffix to fixed_dsp tests
James Almer [Thu, 1 Jun 2017 16:12:20 +0000 (13:12 -0300)]
checkasm: add _fixed suffix to fixed_dsp tests

Should prevents future conflicts with the similarly named floatdsp tests

2 years agoavcodec/cuvid: make capability check optional
Timo Rothenpieler [Thu, 1 Jun 2017 10:29:35 +0000 (12:29 +0200)]
avcodec/cuvid: make capability check optional

2 years agocompat/cuda: make cuvidGetDecoderCaps optional
Timo Rothenpieler [Thu, 1 Jun 2017 10:33:54 +0000 (12:33 +0200)]
compat/cuda: make cuvidGetDecoderCaps optional

2 years agoavcodec/nvenc: print minimum driver version on error
Timo Rothenpieler [Thu, 1 Jun 2017 09:55:25 +0000 (11:55 +0200)]
avcodec/nvenc: print minimum driver version on error

2 years agoconfigure: libnpp does not need to link libcuda
Timo Rothenpieler [Thu, 1 Jun 2017 09:36:13 +0000 (11:36 +0200)]
configure: libnpp does not need to link libcuda

2 years agoavcodec/nvenc: Add default value for AVCodecContext::refs
Srinath K R [Thu, 1 Jun 2017 07:58:07 +0000 (13:28 +0530)]
avcodec/nvenc: Add default value for AVCodecContext::refs

AVCodecContext::refs is used to control the DPB size to be used by the
encoder. The default value for AVCodecContext::refs as set in
libavcodec/options_table.h is 1.

This patch sets AVCodecContext::refs to 0 for h264_nvenc and hevc_nvenc in
order to let the driver take the decision of the correct DPB size to use in
all cases.

Signed-off-by: Srinath K R <skr@nvidia.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agoavutil/pixfmt: remove superfluous define
James Almer [Tue, 23 May 2017 22:05:37 +0000 (19:05 -0300)]
avutil/pixfmt: remove superfluous define

It's an AVColorSpace value since 82ad9cbd32c873bced9adf4a2bb67dcda7294c61.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/wavpack: Fix runtime error: signed integer overflow: 2013265955 - -134217694...
Michael Niedermayer [Wed, 31 May 2017 20:53:02 +0000 (22:53 +0200)]
avcodec/wavpack: Fix runtime error: signed integer overflow: 2013265955 - -134217694 cannot be represented in type 'int'

Fixes: 1922/clusterfuzz-testcase-minimized-5561194112876544

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cinepak: Check input packet size before frame reallocation
Michael Niedermayer [Wed, 31 May 2017 20:18:23 +0000 (22:18 +0200)]
avcodec/cinepak: Check input packet size before frame reallocation

Reduces time spend decoding 1917/clusterfuzz-testcase-minimized-5023221273329664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/hevc_ps: Fix runtime error: signed integer overflow: 2147483628 + 256 cannot...
Michael Niedermayer [Wed, 31 May 2017 20:02:07 +0000 (22:02 +0200)]
avcodec/hevc_ps: Fix runtime error: signed integer overflow: 2147483628 + 256 cannot be represented in type 'int'

Fixes: 1909/clusterfuzz-testcase-minimized-6732072662073344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ra144: Fixes runtime error: signed integer overflow: 7160 * 327138 cannot...
Michael Niedermayer [Wed, 31 May 2017 13:52:56 +0000 (15:52 +0200)]
avcodec/ra144: Fixes runtime error: signed integer overflow: 7160 * 327138 cannot be represented in type 'int'

Fixes: 1908/clusterfuzz-testcase-minimized-5392712477966336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/pnm: Use ff_set_dimensions()
Michael Niedermayer [Wed, 31 May 2017 11:39:45 +0000 (13:39 +0200)]
avcodec/pnm: Use ff_set_dimensions()

Fixes: OOM
Fixes: 1906/clusterfuzz-testcase-minimized-4599315114754048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cavsdec: Fix runtime error: signed integer overflow: 59 + 2147483600 cannot...
Michael Niedermayer [Wed, 31 May 2017 11:21:58 +0000 (13:21 +0200)]
avcodec/cavsdec: Fix runtime error: signed integer overflow: 59 + 2147483600 cannot be represented in type 'int'

Fixes: 1903/clusterfuzz-testcase-minimized-5359318167715840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoexamples/encode_video: slightly improve error reporting
Stefano Sabatini [Tue, 23 May 2017 10:22:09 +0000 (12:22 +0200)]
examples/encode_video: slightly improve error reporting

2 years agoexamples/encode_video: add log
Stefano Sabatini [Tue, 23 May 2017 09:50:40 +0000 (11:50 +0200)]
examples/encode_video: add log

This helps to visualize how the send/receive API works.