64918 Commits

Author SHA1 Message Date
Michael Niedermayer
eb0a9cd68a avcodec/ffv1dec: Check for 0 quant tables
Fixes assertion failure
Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5745cf799a4389bc5d14f2b4daf32fe4631c50bc)
2015-12-06 14:13:04 +01:00
Andrey Utkin
f450caf057 doc/filters/drawtext: fix centering example
Signed-off-by: Andrey Utkin <andrey.od.utkin@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
(cherry picked from commit 648b26acc5e25ab40c43fddc54b50e9f0b13ebd8)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2015-12-01 17:33:33 -08:00
Ronald S. Bultje
f6006295c0 videodsp: don't overread edges in vfix3 emu_edge.
Fixes trac ticket 3226. Also see Andreas' analysis in
https://bugs.debian.org/801745, which was very helpful.
(cherry picked from commit 52f84d82bdf1851ecfcc412c1719e5f6f3396209)
2015-10-25 01:25:17 +02:00
Michael Niedermayer
5279f5d068 avcodec/h264_mp4toannexb_bsf: Reorder operations in nal_size check
Fixes Ticket4778

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2bb54b82b5094fd906aa28c0443be08c95662a31)
2015-10-09 22:46:33 +02:00
Michael Niedermayer
d40ab18c07 avformat/oggenc: Check segments_count for headers too
Fixes infinite loop and segfault in ogg_buffer_data()
Fixes Ticket4806

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 81a8701eb52d2b6469ae16ef442ce425388141b7)
2015-10-09 22:46:18 +02:00
Michael Niedermayer
80a467b452 avformat/avidec: Workaround broken initial frame
Fixes Ticket4851

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e2ef00394b8079e93835d47c993868229f07502)
2015-10-09 22:46:05 +02:00
Hendrik Leppkes
9e1b493916 hevc: properly handle no_rasl_output_flag when removing pictures from the DPB
Fixes ticket #4185.

Reviewed-By: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
(cherry picked from commit 0118158efa8e45761f9f65a3bb74f33907bd2aec)
2015-10-09 22:45:48 +02:00
Ronald S. Bultje
44184226ac hevc: fix wpp threading deadlock.
Fixes ticket 4258.
(cherry picked from commit 74e4948235bc8f8946eeca20525258bbf383f75d)
2015-10-09 22:45:11 +02:00
Michael Niedermayer
e2f0443af0 avcodec/ffv1: seperate slice_count from max_slice_count
Fix segfault with too large slice_count
Fixes Ticket4879

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

Conflicts:
	libavcodec/ffv1enc.c
	libavcodec/ffv1.c
2015-10-09 22:44:48 +02:00
wm4
f57a595024 avcodec/mp3: fix skipping zeros
Commits 43bc5cf9 and c5371f77 add code for skipping initial zeros in mp3
packets. This code forgot to report to the user that data was skipped at
all.

Since audio codecs allow partial packet decoding, the user application
has to rely on the return value. It will remove the data reported as
consumed by the decoder, and feed it to the decoder again. This resulted
in the mp3 frame after the zero region to be decoded over and over
again, until the zero region was finally skipped by the application.

Fix this by including the amount of skipped bytes to the number of
consumed bytes returned by the decode call.

Fixes trac ticket #4890.
(cherry picked from commit cb1da9fb8d71bb611a7b0028914c97afc3f5711d)
2015-10-09 22:44:00 +02:00
Michael Niedermayer
d88a85c493 MAINTAINERS: Remove myself as leader
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f2c58931e629343f7d68258cc2b2d62c5f501ba5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-31 18:35:31 +02:00
Michael Niedermayer
bf4fa00162 avformat/swfdec: Do not error out on pixel format changes
Instead print an error and continue

Fixes Ticket4702

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a1204a1a46674084b1e6b92562f81aaab7aac69)
2015-07-08 12:48:57 +02:00
Paul B Mahol
17d9157c82 avcodec/exr: fix crash caused by merge
Various header informations need to be reset when decoding next frame.
Regression since: 95582b5c

Fixes ticket #4597.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit a03b69478b7f1c0c31e53acb0cf392917c0f967a)
2015-06-19 11:32:32 +02:00
Michael Niedermayer
e1afd6ed60 avcodec/x86/h264_weight: handle weight1=128
Fix ticket4596

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e1009665759d4a3938dd2dd07b7e84d8bc9c5290)
2015-06-19 11:32:20 +02:00
Michael Niedermayer
7d97587b1a avformat/mov: Mark avio context of decompressed atoms as seekable
Fixes Ticket4329

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8ce564ea280b61d21eebf8a2fd741f792ce81638)
2015-06-19 11:32:06 +02:00
Michael Niedermayer
86c85b6f1a avfilter/x86/vf_hqdn3d: Fix register types
Fixes Ticket4301

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 52fc3e372f8ed4de5735abed1f7f7569fe37b023)
2015-06-19 11:31:53 +02:00
Carl Eugen Hoyos
ac4126decd lavfi/fade: Do not overread input buffer.
(cherry picked from commit ab3ff19f08b7a83e320c39ab066f289c242b8030)
2015-05-17 12:48:21 +02:00
Michael Niedermayer
db27f50e06 avformat/mov: Fix mixed declaration and statement warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n2.3.6
2015-01-06 19:53:11 +01:00
Michael Niedermayer
8327bef1c9 Update for 2.3.6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 19:37:09 +01:00
Michael Niedermayer
a620c463f0 cmdutils: Use 64bit for file size/offset related variable in cmdutils_read_file()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 369b4cd4120bf67aa5187b6bc72574970a24ca22)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
63b5cb1fb0 avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bbfca8e84b0e69abba523d665536c0135fc1c00e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
7959b9a0f3 avformat/matroskadec: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6e70e4aca50696040cc9256ec96e5c31d9641432)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Paul B Mahol
bbfe0f7b08 lavfi: check av_strdup() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 145a84717b62e086cdb5f26649ad9f1b51ef38d0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Dale Curtis
27a910a857 mov: Fix negative size calculation in mov_read_default().
The previous code assumed if an atom was marked with a 64-bit
size extension, it actually had that data available. The new
code verfies there's enough data in the atom for this to be
done.

Failure to verify causes total_size > atom.size which will
result in negative size calculations later on.

Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ebd76a9c57558e284e94da367dd23b435e6a6d0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
ffe915b6f5 avformat/mov: fix integer overflow in mov_read_udta_string()
Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3859868c75313e318ebc5d0d33baada62d45dd75)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Dale Curtis
22558d6f6e mov: Avoid overflow with mov_metadata_raw()
The code previously added 1 to len without checking its size,
resulting in an overflow which can corrupt value[-1] -- which
may be used to store unaligned ptr information for certain
allocators.

Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
wm4
f03888b449 avcodec/dvdsubdec: fix out of bounds accesses
The code blindly trusted buffer offsets read from the file in the RLE
decoder. Explicitly check the offset. Also error out on other RLE
decoding errors.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
11c0531099 avfilter/vf_sab: fix filtering tiny images
Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
0b033cd3a1 avformat/flvdec: Increase string array size
Fixes parsing httphostheader of Scarlatti\,\ Pieter-Jan\ Belder\ -\ Sonata\ K113\ in\ A\ major\ -\ Alle.flv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
c9a25ff5a0 avformat/flvdec: do not inject dts=0 metadata packets which failed to be parsed into a new data stream
Such data streams (which then contain no other packets except the faulty one)
confuse some user applications, like VLC
Works around vlcticket 12389

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

Conflicts:

	libavformat/flvdec.c
2015-01-06 18:28:35 +01:00
Michael Niedermayer
3ee4a610c2 avformat/cdxl: Fix integer overflow of image_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3eb5cbe0c50d0a0bbe10bcabbd6b16d73d93c128)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
d071c1f0e1 avformat/segment: Use av_freep() avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 68fa549230af35179df2a2af2bdb84ee6c825bed)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Clément Bœsch
15601df419 avformat/mov: strengthen some table allocations
(cherry picked from commit 5ab882d7283f57560c889919c35f2688253b1d9c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
103cf56c62 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 1b5d11240692025f036e945bc37968735679320a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:35 +01:00
Michael Niedermayer
d4c45f9249 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 4ae87554f3c8bc54db572873f5049427a7e6cb31)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
841ce9a838 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 649c158e8c94ac0cff7f03e97d6ea8bbf71b7f02)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Anton Khirnov
8a01fb3729 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: 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e
These should be redundant, but are backported for saftey anyway
(cherry picked from commit b0273232d8fffdc8a977ccdad460b8071a0e353c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Anton Khirnov
b5dbe93c8b 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: 105654e376a736d243aef4a1d121abebce912e6b
These should be redundant, but are backported for saftey anyway
(cherry picked from commit e012cb8dea7969c7b3927dbf846ef2742cd4a7ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
185e55279c avcodec/indeo3: ensure offsets are non negative
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 368642361f3a589d7b0c23ea327d988edb434e3f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
730826275f 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 61296d41e2de3b41304339e4631dd44c2e15f805)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
afd7fac3f1 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 3281fa892599d71b4dc298a426af8296419cd90e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
3353a00d58 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 e8714f6f93d1a32f4e4655209960afcf4c185214)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
b052ea0f5b 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 8aa8d12554868c32436750f881954193087219c8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
c8fb53357d 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 7d593495e42e92693cc8f3ce9b42cf3edcea377a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
30e7dae22c 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 3305acdc92fa37869f160a11a87741c8a0de0454)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
a74a0a5c0c 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 f3b5b139ad853b6f69c6a0b036815a60e7b3f261)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
0f77303c57 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>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
dbe690b572 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>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
6eca20aaec 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 caa7a3914f499f74b3ee346f26d598ebdc0ec210)

Conflicts:

	libavformat/isom.h
2015-01-06 18:28:34 +01:00
Michael Niedermayer
7ef11e8221 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 3881606240953b9275a247a1c98a567f3c44890f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00