1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00
Commit Graph

75243 Commits

Author SHA1 Message Date
KO Myung-Hun
8dd71d0bd4 MAINTAINERS: add myself as an OS/2 maintainer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 346ec91764)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-15 13:22:45 +01:00
Michael Niedermayer
536f6c4ec2 avutil/frame: Free destination qp_table_buf in frame_copy_props()
Fixes memleak
Fixes: Ticket4899

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4099e4a77d)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 21:08:23 +01:00
Michael Niedermayer
af21d609a0 Update for 2.8.6
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 16:23:43 +01:00
Michael Niedermayer
b15ae71305 avcodec/jpeg2000dec: More completely check cdef
Fixes out of array access
Fixes: j2k-poc.bin

Found-by: Lucas Leong <wmliang.tw@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0aada30510)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
6fec0dbd2e avutil/opt: check for and handle errors in av_opt_set_dict2()
Previously errors could result in random entries to be lost.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f3ace85d88)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Paul B Mahol
0dc379cfa6 avcodec/flacenc: fix calculation of bits required in case of custom sample rate
Sample rate of 11025 takes 16 bits but previous code would pick only 8.
Fixes assertion failure.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 3e7d684912)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
b432d883e6 avformat: Document urls a bit
Spell-checked-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3130556c0e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
736e42bc33 avformat/libquvi: Set default demuxer and protocol limitations
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 15cc98a0f3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
cb88f428b3 avformat/concat: Check protocol prefix
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8e32d01432)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
e0d53cbeef doc/demuxers: Document enable_drefs and use_absolute_path
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9a8034b8bc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
9819998342 avcodec/mjpegdec: Check for end for both bytes in unescaping
Fixes assertion failure
Fixes: c40c779601b77dc6e19aaea0b04b9751/signal_sigabrt_7ffff6ae7cb7_5769_b94f6ec70caecb2d3d76b4771b109ac1.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 509c9e74e5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
85cfcb87ff avcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer()
Fixes assertion failure
Fixes: 6568d187979ce17878b6fe5fbbb89142/signal_sigabrt_7ffff6ae7cb7_7176_564bbc6741bdcf907f5c4e685c9a77a2.mpg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b65efbc0f4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
971f47f2eb avformat/avformat: Replace some references to filenames by urls
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 41e07390e0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
00393c56da avcodec/wmaenc: Check ff_wma_init() for failure
Fixes null pointer dereference
Fixes: c4faf8280ba366bf00a79d425f2910a8/signal_sigsegv_1f96477_5177_1448ba7e4125faceb966f44ceb69abfa.qcp
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 19e456d48c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
f77b656b6e avcodec/mpeg12enc: Move high resolution thread check to before initializing threads
Cleaner solution is welcome!

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a53fbda9dc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
8ed4b44657 avformat/img2dec: Use AVOpenCallback
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b750b67d13)

Conflicts:

	libavformat/img2dec.c
2016-01-28 15:53:54 +01:00
Michael Niedermayer
642c54270b avformat/avio: Limit url option parsing to the documented cases
This feature is not know much or used much AFAIK, and it might be helpfull in
exploits.
No specific case is known where it can be used in an exploit though
subsequent commits depend on this commit though

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 984d58a344)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
d64ff3a6a9 avformat/img2dec: do not interpret the filename by default if a IO context has been opened
With this, user applications which use custom IO and have set a IO context will not have
their already opened IO context ignored and glob/seq being interpreted

Comments and tests from maintainers of user apps are welcome!

Liked-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7ccedc1c78)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Michael Niedermayer
c6f6829ce6 avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get()
Fixes: 55d71971da50365d542ed14b65565fe1/signal_sigsegv_4765a4_8499_f146af090a94f591d6254515c7700ef5.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 158f0545d8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:54 +01:00
Derek Buitenhuis
b9551e71bf mov: Add an option to toggle dref opening
This feature is mostly only used by NLE software, and is
both of dubious value being enabled by default, and a
possible security risk.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 712d962a6a)

Conflicts:

	libavformat/isom.h
	libavformat/mov.c
	libavformat/version.h

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
828d85bf86 avcodec/gif: Fix lzw buffer size
Fixes out of array access
Fixes: aaa479088e6fb40b04837b3119f47b04/asan_heap-oob_e38c68_8576_9d653078b2470700e2834636f12ff557.tga

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 03d83ba34b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
aa833e1a60 avcodec/put_bits: Assert buf_ptr in flush_put_bits()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3ef5de0f19)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
61850f1c84 avcodec/tiff: Check subsample & rps values more completely
Fixes out of array access
Fixes: 83aedfb29af669c4d6e10f1bfad974d2/asan_heap-oob_1ab42fe_4984_9f6ec14462f8d8a00ea24b320572a963.tif

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 89f464e9c2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
6897859b5a swscale/swscale: Add some sanity checks for srcSlice* parameters
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 321e85e176)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
f121ed611e swscale/x86/rgb2rgb_template: Fix planar2x() for short width
Fixes: 451b3e0cf956c0bd2f27ed753ac24050/asan_heap-oob_2873c01_3231_7ed10a9464d15f0d57277f5917c566a8.AVI

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8a9aaab26)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
6eb76b34ca swscale/swscale_unscaled: Fix odd height inputs for bayer_to_yv12_wrapper()
Fixes: 372d2df1f04b49e25f109f07f90b1505/asan_heap-oob_2835d2e_8501_99e0114d7ba3a6db885d0b4684d200c1.cine
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 757248ea3c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
034edcec6d swscale/swscale_unscaled: Fix odd height inputs for bayer_to_rgb24_wrapper()
Fixes: 372d2df1f04b49e25f109f07f90b1505/asan_heap-oob_2835d2e_8501_99e0114d7ba3a6db885d0b4684d200c1.cine
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ad3b6fa7d8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
8008a029ab avcodec/aacenc: Check both channels for finiteness
Fixes null pointer dereference
Fixes: 10412fc52ecc6eab40ed67f82ca7b372/signal_sigsegv_2618c99_2129_f808373959e46afb165593332799ffbc.aif

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 057549a9cc)

Conflicts:

	libavcodec/aacenc.c
2016-01-28 15:53:53 +01:00
Andreas Cadhalpun
d640bc7545 asfdec_o: check for too small size in asf_read_unknown
This fixes infinite loops due to seeking back.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit c29e87ad55)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:45 +01:00
Andreas Cadhalpun
93559adfbf asfdec_o: break if EOF is reached after asf_read_packet_header
asf_read_payload can unset eof_reached, so check it also before calling
that function.

This fixes infinite loops.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 0e32153e9c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:45 +01:00
Andreas Cadhalpun
4679e54388 asfdec_o: make sure packet_size is non-zero before seeking
This fixes infinite loops due to seeking back.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 3776a72962)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:45 +01:00
Andreas Cadhalpun
782257ba66 asfdec_o: prevent overflow causing seekback
This fixes infinite loops.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 74474750f1)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:45 +01:00
Andreas Cadhalpun
e188c267c8 asfdec_o: check avio_skip in asf_read_simple_index
The loop can be very long, even though the file is very short.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 0002d845e8)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
407ab167c0 asfdec_o: reject size > INT64_MAX in asf_read_unknown
Both avio_skip and detect_unknown_subobject use int64_t for the size
parameter.

This fixes a segmentation fault due to infinite recursion.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit aa18016996)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
d7fbd03660 asfdec_o: only set asf_pkt->data_size after sanity checks
Otherwise invalid values are used unchecked in the next run.
This can cause NULL pointer dereferencing.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 763c572801)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Hendrik Leppkes
2cd41c5d52 Merge commit '8375dc1dd101d51baa430f34c0bcadfa37873896'
* commit '8375dc1dd101d51baa430f34c0bcadfa37873896':
  asfdec: handle the case when the stream index has an invalid value better

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
(cherry picked from commit bf67ae3cfa)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
1272b88d04 dca: fix misaligned access in avpriv_dca_convert_bitstream
src and dst are only 8-bit-aligned, so accessing them as uint16_t causes
SIGBUS crashes on architectures like sparc.

This fixes ubsan runtime error: load of misaligned address for type
'const uint16_t', which requires 2 byte alignment

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 44ac13eed4)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
cf99f0dd0f brstm: fix missing closing brace
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 1cb2331eca)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
247bb203e4 brstm: also allocate b->table in read_packet
This fixes NULL pointer dereferencing if the codec is forced to
adpcm_thp even though a different one was detected.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit bcf4ee26a0)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
94b9e7caae brstm: make sure an ADPC chunk was read for adpcm_thp
This fixes NULL pointer dereferencing.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit d7d37c479f)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
6ffaf40c02 vorbisdec: reject rangebits 0 with non-0 partitions
This causes non-unique elements in floor_setup->data.t1.list, which
makes the stream undecodable according to the specification.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit e7a7b3135a)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
e3d7796336 vorbisdec: reject channel mapping with less than two channels
It causes the angle channel number to equal the magnitude channel
number, which makes the stream undecodable according to the
specification.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit b4b13848de)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Andreas Cadhalpun
667a23a032 ffmdec: reset packet_end in case of failure
This fixes segmentation faults caused by passing a packet_ptr of NULL to
memcpy.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 40eb2531b2)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:45:44 +01:00
Paul B Mahol
7b0fb4fdf7 avformat/ipmovie: put video decoding_map_size into packet and use it in decoder
The size of decoding map can differ from one calculated
internally, producing artifacts while decoding video.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit c293ef258c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:28:49 +01:00
Paul B Mahol
40ebeee3fc avformat/brstm: fix overflow
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 3441fef0f8)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-27 23:28:43 +01:00
James Almer
b8fa3ff95d avcodec/wavpackenc: print channel count in av_log call
Fixes a warning with -Wformat-extra-args
(cherry picked from commit 17e7fdf61a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 17:53:58 +01:00
James Almer
063928910f configure: bump copyright year to 2016
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 78129978f0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 16:26:06 +01:00
Michael Niedermayer
e303ca3ac9 Update for 2.8.5
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 16:25:51 +01:00
Michael Niedermayer
28f89bc439 avformat/hls: Even stricter URL checks
This fixes a null pointer dereference at least

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cfda1bea4c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 15:49:35 +01:00
Michael Niedermayer
23b903aaf4 avformat/hls: More strict url checks
No case is known where these are needed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6ba42b6482)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 14:17:28 +01:00