Commit Graph

66555 Commits

Author SHA1 Message Date
Clément Bœsch
47e4a1ac6d avformat/mov: strengthen some table allocations
(cherry picked from commit 5ab882d728)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 11:47:06 +01:00
Michael Niedermayer
a058cbcfdf avformat/mov: Fix memleaks for duplicate STCO/CO64/STSC atoms
Also see [FFmpeg-devel] [PATCH] avformat/mov: strengthen some table allocations
which contains more fixes but is unfinished

Fixes: signal_sigabrt_7ffff6ac7bb9_3484_cov_1830000177_starfox2.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1b5d112406)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 11:47:02 +01:00
Michael Niedermayer
4895211635 on2avc: check number of channels
Fixes invalid memory access.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8549
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit cee4490b52)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:41 +01:00
Michael Niedermayer
58dc526ebf smc: fix the bounds check
Fixes invalid writes when there are more blocks in a run than total
remaining blocks.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8548
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit d423dd72be)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:41 +01:00
Michael Niedermayer
eac49477aa gifdec: refactor interleave end handling
Fixes invalid writes with very small image heights.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8547
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 0b39ac6f54)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:41 +01:00
Anton Khirnov
69a930b988 mmvideo: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 2.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8543
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 17ba719d9b)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:41 +01:00
Anton Khirnov
55788572ea jvdec: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 8.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8542
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 88626e5af8)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:40 +01:00
Anton Khirnov
aa7a19b417 mjpegdec: check for pixel format changes
Fixes possible invalid memory access.

Based on code by Michael Niedermayer <michaelni@gmx.at>

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8541
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 809c3023b6)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:40 +01:00
Anton Khirnov
577f1feb3f mov: avoid a memleak when multiple stss boxes are present
CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 64f7575fbd)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:40 +01:00
Michael Niedermayer
4afe2684d8 Makefile: add dependencies which require ffversion.h
Without this ffversion.h could sometimes be built too late

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4ae87554f3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 04:34:45 +01:00
Michael Niedermayer
5d1d143a4e Update for FFmpeg 2.4.5
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 03:03:47 +01:00
Michael Niedermayer
820f41e1a1 Add FFMPEG_VERSION into the binary libs
This simplifies identifying from which revision a binary of a lib came from

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 649c158e8c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:26:27 +01:00
wm4
14d6ea0c45 lavu/frame: fix malloc error path in av_frame_copy_props()
The error path frees all side data, but forgets to reset the side data
count. This can blow up later in av_frame_unref() and free_side_data().

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a400edbb6d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
0fb2b61614 avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference()
Fixes Ticket3686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a29524bf2e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
0d277be45a avformat/aviobuf: Check that avio_seek() target is non negative
Fixes out of array access

Suggested-by: Andrew Scherkus <scherkus@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ed86dbd05d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Rob Sykes
3b332ef33c swresample/soxr_resample: fix error handling
Fixes CID1257659

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4b6f225374)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
787e4d12da avformat/flvdec: fix potential use of uninitialized variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0fadbd3623)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
wm4
95c298b125 avformat/matroskadec: fix handling of recursive SeekHead elements
When matroska_execute_seekhead() is called, it goes through the list of
seekhead entries and attempts to read elements not read yet. When doing
this, the parser can find further SeekHead elements, and will extend the
matroska->seekhead list. This can lead to a (practically) infinite loop
with certain broken files. (Maybe it can happen even with valid files.
The demuxer doesn't seem to check correctly whether an element has
already been read.)

Fix this by ignoring elements that were added to the seekhead field
during executing seekhead entries.

This does not fix the possible situation when multiple SeekHead elements
after the file header (i.e. occur after the "before_pos" file position)
point to the same elements. These elements will probably be parsed
multiple times, likely leading to bugs.

Fixes ticket #4162.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6551acab68)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
fd72ff6f31 doc/examples/transcoding: check encoder before using it
Fixes null pointer exception

Found-by: stoupeace
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bde27e1e61)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
82db2f2ac8 ffmpeg: drop usage of coded_frame
It causes all kinds of problems and there is no code in the muxers that reads
this field

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 242f1152bf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
f36b3c5df9 swscale/x86/rgb2rgb_template: fix crash with tiny size and nv12 output
Fixes Ticket4151

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8524558858)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
117dcc2097 avformat/rmdec: Check codec_data_size
Fixes infinite loop
Fixes Ticket4154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a6f730730b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
c4e18917d4 avformat/aviobuf: Fix infinite loop in ff_get_line()
Fixes ticket4152

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit eac5c7b837)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:25:54 +01:00
Michael Niedermayer
03fbc282ff Merge commit '3ea49fc5081d63277ecbc12ed440af4b02ddfdf9' into release/2.4
* commit '3ea49fc5081d63277ecbc12ed440af4b02ddfdf9':
  vc1: Do not assume seek happens after decoding

See: 6801eb0a09
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 02:17:20 +01:00
Clément Bœsch
f30a89e15f avformat/rsd: make tag_buf string larger
av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit edbbb11488)
2014-12-19 18:02:13 -03:00
Luca Barbato
3ea49fc508 vc1: Do not assume seek happens after decoding
If a seek is requested before the decoding start there is no
current picture.

CC: libav-stable@libav.org
(cherry picked from commit 3e348ecfc6ab1830e43288a9e12e8f0a000afbcb)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-12-19 17:58:22 +01:00
Anton Khirnov
9bafd6a8f6 mmvideo: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 2.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
See: 8b0e96e1f2
These should be redundant, but are backported for saftey anyway
(cherry picked from commit b0273232d8fffdc8a977ccdad460b8071a0e353c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 15:52:23 +01:00
Anton Khirnov
396195c505 jvdec: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 8.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
See: 105654e376
These should be redundant, but are backported for saftey anyway
(cherry picked from commit e012cb8dea7969c7b3927dbf846ef2742cd4a7ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 15:52:22 +01:00
Michael Niedermayer
e2324b5b37 avcodec/indeo3: ensure offsets are non negative
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 368642361f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18 19:10:46 +01:00
Michael Niedermayer
bb97f243ba avcodec/h264: Check *log2_weight_denom
Fixes undefined behavior
Fixes: signal_sigsegv_14768d2_2248_cov_3629497219_h264_h264___pi_20070614T182942.h264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 61296d41e2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18 03:48:33 +01:00
Michael Niedermayer
b6dc16bd95 avcodec/hevc_ps: Check diff_cu_qp_delta_depth
Fixes undefined behavior
Fixes: asan_static-oob_17aa046_582_cov_1577759978_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3281fa8925)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18 02:32:11 +01:00
Michael Niedermayer
a9c77e5c22 avcodec/h264: Clear delayed_pic on deallocation
Fixes use of freed memory

Fixes: case5_av_frame_copy_props.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e8714f6f93)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-17 22:14:34 +01:00
Michael Niedermayer
de882ec2b1 avcodec/hevc: clear filter_slice_edges() on allocation
This avoids use of uninitialized memory
Fixes: asan_static-oob_17aa046_582_cov_212287884_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8aa8d12554)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-17 20:02:06 +01:00
Michael Niedermayer
bd62554ad2 avcodec/dcadec: Check that the added xch channel isnt already there
Fixes null pointer dereference
Fixes: signal_sigsegv_369609d_623_cov_2008234281_ES_6.1_16bit.dts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7d593495e4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-17 20:02:05 +01:00
Michael Niedermayer
cd51f41791 avcodec/indeo3: use signed variables to avoid underflow
Fixes out of array read
Fixes: signal_sigsegv_1b0a4da_1865_cov_2167818389_computer_anger.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3305acdc92)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-17 05:24:36 +01:00
Michael Niedermayer
da811dfc93 avcodec/h264: make the first field of H264Context an AVClass
Fixes use of freed memory
Fixes: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f3b5b139ad)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-17 02:14:25 +01:00
Michael Niedermayer
dce726f091 swscale: increase yuv2rgb table headroom
Fixes out of array access
Fixes: case2_bad_read_yuv2rgbx32.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 23:58:50 +01:00
Michael Niedermayer
ea5b4c682c avformat/mov: fix integer overflow of size
Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 23:58:49 +01:00
Michael Niedermayer
65d426bddd avformat/mov: check atom nesting depth
Fixes call stack overflow
Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit caa7a3914f)

Conflicts:

	libavformat/isom.h
2014-12-16 23:55:35 +01:00
Michael Niedermayer
64fdce7802 avcodec/utvideodec: Fix handling of slice_height=0
Fixes out of array accesses
Fixes: asan_heap-oob_25bcd7e_3783_cov_3553517262_utvideo_rgba_median.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3881606240)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 23:06:23 +01:00
Michael Niedermayer
195e8ecacc avcodec/vmdvideo: Check len before using it in method 3
Fixes out of array access
Fixes: asan_heap-oob_4d23ba_91_cov_3853393937_128.vmd

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3030fb7e0d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 19:38:08 +01:00
Michael Niedermayer
a4ffcf024e avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 91ea466551)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 15:55:35 +01:00
Michael Niedermayer
da52c0ebc6 avformat/hdsenc: Use av_freep() avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 16d763fa45)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 15:55:34 +01:00
Michael Niedermayer
8815ddc29f configure: create the tests directory like the doc directory
This fixes an issue where the tests directory is not created for out of tree
builds before its needed

Tested-by: Dave Yeo <daveryeo@telus.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e631872f13)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 15:54:10 +01:00
Michael Niedermayer
5ceae49caf Merge commit '864c0c50eb0e7a112b20007459b0cb94b61cb8d3' into release/2.4
* commit '864c0c50eb0e7a112b20007459b0cb94b61cb8d3':
  avconv: Use the mpeg12 private option scan_offset

Conflicts:
	ffmpeg_opt.c

See: e479013ae4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 13:44:00 +01:00
Julien Ramseier
864c0c50eb avconv: Use the mpeg12 private option scan_offset
Introduced in aed7900704

Bug-Id: debian/773055
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit fd665f7f48)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-14 18:43:25 +01:00
Brad Smith
89dbef7329 v4l2: Make use of the VIDIOC_ENUM_FRAMESIZES ioctl on OpenBSD
Make use of the V4L2 VIDIOC_ENUM_FRAMESIZES ioctl on OpenBSD.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 04a4fb81b3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 12:57:20 +01:00
Michael Niedermayer
93df243a59 avcodec/motion_est: use 2x8x8 for interlaced qpel
Fixes out of array read
Fixes Ticket4121

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b50e003e1c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 12:57:20 +01:00
Michael Niedermayer
db61d34e83 Merge commit '1cc6fef0671c5522c952671ee06bf973135a22c4' into release/2.4
* commit '1cc6fef0671c5522c952671ee06bf973135a22c4':
  Prepare for 11.1 Release

Conflicts:
	RELEASE

Not merged, as our release numbers differ

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 12:42:38 +01:00
Michael Niedermayer
309609ce4d Merge commit '60ccc1a748bf3d26201411479146d0798e1ecff9' into release/2.4
* commit '60ccc1a748bf3d26201411479146d0798e1ecff9':
  Update changelog for v11.1

Conflicts:
	Changelog

Not merged, the changelog does not match FFmpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 12:40:20 +01:00