Commit Graph

67343 Commits

Author SHA1 Message Date
Derek Buitenhuis
8380f62155 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-02-01 02:13:24 +01:00
Michael Niedermayer
a49d870aac MAINTAINERS: remove unmaintained releases
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-01 02:12:22 +01:00
Michael Niedermayer
a944744f19 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-02-01 02:12:22 +01:00
Michael Niedermayer
9a1433683c 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-02-01 02:12:22 +01:00
Paul B Mahol
ac8a265be8 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-02-01 02:12:22 +01:00
Michael Niedermayer
106e0fff2e 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-02-01 02:12:22 +01:00
Michael Niedermayer
53f5efcae1 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-02-01 02:12:22 +01:00
Michael Niedermayer
4f52c0a619 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-02-01 02:12:22 +01:00
Michael Niedermayer
fa9873cce8 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-02-01 02:12:22 +01:00
Michael Niedermayer
76de78a9db 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-02-01 02:12:22 +01:00
Michael Niedermayer
9e44ea7c0f 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-02-01 02:12:21 +01:00
Michael Niedermayer
0732e7b0ea 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-02-01 02:12:21 +01:00
Michael Niedermayer
5af5932904 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-02-01 02:12:21 +01:00
Michael Niedermayer
a9a6e4e9c1 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-02-01 02:12:21 +01:00
Michael Niedermayer
49ae02d36f 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-31 00:25:21 +01:00
Michael Niedermayer
c88fa43a3a 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-31 00:25:20 +01:00
Michael Niedermayer
7142ddcf92 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-31 00:25:20 +01:00
Michael Niedermayer
5d40272ba8 swscale/swscale: Add some sanity checks for srcSlice* parameters
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 321e85e176)

Conflicts:

	libswscale/swscale.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
f8728dc834 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-31 00:25:20 +01:00
Michael Niedermayer
af384c8703 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-31 00:25:20 +01:00
Michael Niedermayer
e4b2c75c2a 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-31 00:25:20 +01:00
James Almer
a6ef7205e9 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-31 00:25:20 +01:00
James Almer
2a2205b051 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-31 00:25:20 +01:00
Michael Niedermayer
c0df58b0e5 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)

Conflicts:

	libavformat/hls.c
2016-01-31 00:25:20 +01:00
Michael Niedermayer
990abbd1c6 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)

Conflicts:

	libavformat/hls.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Conflicts:

	libavformat/hls.c
2016-01-31 00:25:20 +01:00
Michael Niedermayer
38369313b9 swscale/yuv2rgb: Increase YUV2RGB table headroom
This makes SWS more robust
Fixes: 07650a772d98aa63b0fed6370dc89037/asan_heap-oob_27ddeaf_2657_2c81ff264dee5d9712cb3251fb9c3bbb.264
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 8f3a9a8c27)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
ed44b57935 swscale/yuv2rgb: Factor YUVRGB_TABLE_LUMA_HEADROOM out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5e5f82a287)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Maxim Andreev
70b35708b9 avformat/hls: forbid all protocols except http(s) & file
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7145e80b4f)

Conflicts:

	libavformat/hls.c
2016-01-31 00:25:20 +01:00
Michael Niedermayer
66aeb5467e avformat/aviobuf: Fix end check in put_str16()
Fixes out of array read
Fixes: 03c406ec9530e594a074ce2979f8a1f0/asan_heap-oob_7dec26_4664_37c52495b2870a2eaac65f53958e76c1.flac

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
937f3058fa avformat/asfenc: Check pts
Fixes integer overflow
Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
78f9c7dd14 avcodec/mpeg4video: Check time_incr
Fixes assertion failure
Fixes out of memory access

Fixes: test_casex.ivf

Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7c97946d61)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
250e5cb71d avcodec/wavpackenc: Check the number of channels
They are stored in a byte, thus more than 255 is not possible

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
60bc36193e avcodec/wavpackenc: Headers are per channel
Fixes: 1b8b83a53bfa751f01b1daa65a4758db/signal_sigabrt_7ffff6ae7cb7_7488_403f71d1a2565b598d01b6cb110fac8f.aiff
Fixes: assertion failure

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

Conflicts:

	libavcodec/wavpackenc.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
d8cb5887c1 avcodec/dvdec: Fix "left shift of negative value -254"
Fixes: dvdec_left_shift.avi

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 93ac72a98d)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
5c0d8a8387 avcodec/mjpegdec: Fix negative shift
Fixes: mjpeg_left_shift.avi

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d86d7b2486)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
f6a503c443 avcodec/mss2: Check for repeat overflow
Fixes: mss2_left_shift.wmv

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e273dade78)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
dd28571530 avformat: Add integer fps from 31 to 60 to get_std_framerate()
Fixes Ticket 5106

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
5fe8dad467 avcodec/mpegvideo_enc: Clip bits_per_raw_sample within valid range
Fixes out of array read
Fixes: test_case-mdc.264 (b47be15a120979f5a1a945c938cbef33)

Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 13f266b50c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
593dea80f2 avcodec/motion_est: Fix mv_penalty table size
Fixes out of array read

Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5b4da8a38a)

Conflicts:

	libavcodec/motion_est.h
2016-01-31 00:25:20 +01:00
Michael Niedermayer
8158fb129e avcodec/h264_slice: Fix integer overflow in implicit weight computation
Fixes mozilla bug 1230423

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

Conflicts:

	libavcodec/h264_slice.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
7ea0e525ed swscale/utils: Use normal bilinear scaler if fast cannot be used due to tiny dimensions
Fixes Ticket4960

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:20 +01:00
Michael Niedermayer
0affd64b1c avcodec/put_bits: Always check buffer end before writing
This causes a overall slowdown of 0.1 % (tested with mpeg4 single thread encoding of matrixbench at QP=3)

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

Conflicts:

	libavcodec/put_bits.h
2016-01-31 00:25:20 +01:00
Michael Niedermayer
41289bc853 swscale/utils: Fix intermediate format for cascaded alpha downscaling
Fixes Ticket4926

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:19 +01:00
Michael Niedermayer
ffda227636 avcodec/h264_refs: Fix long_idx check
Fixes out of array read
Fixes mozilla bug 1233606

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:19 +01:00
Michael Niedermayer
8132ed4a43 avfilter/vf_mpdecimate: Add missing emms_c()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 997de2e810)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:19 +01:00
Michael Niedermayer
fc0f08f9fb avformat/mxfenc: Do not crash if there is no packet in the first stream
Fixes: Ticket4914

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:19 +01:00
Michael Niedermayer
a2966c7d1f swscale/swscale-test: Fix slice height in random reference data creation.
Found-by: Pedro Arthur <bygrandao@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:25:02 +01:00
Andreas Cadhalpun
859a348e44 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-28 02:15:49 +01:00
Andreas Cadhalpun
368a1803ff 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-28 02:15:49 +01:00
Andreas Cadhalpun
ab13ba2ae8 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-28 02:15:49 +01:00