Commit Graph

50810 Commits

Author SHA1 Message Date
a57d29a50c avformat/mpegtsenc: Check data array size in mpegts_write_pmt()
Prevents out of array writes

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

Conflicts:

	libavformat/mpegtsenc.c
(cherry picked from commit e87de3f50b765134588d0b048c32ed4b8acc16fb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 03:06:10 +01:00
11b14d0e63 avcodec/wmalosslessdec: fix mclms_coeffs* array size
Fixes corruption of context
Fixes: 8835659dde6a4f7dcdf341de6a45c6c8-signal_sigsegv_1dce67b_4564_cov_2504444599_classical_22_16_1_14000_v3c_0_extend_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ec9578d54d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 03:06:10 +01:00
bb683ebdba samplefmt: avoid integer overflow in av_samples_get_buffer_size()
CC:libav-stable@libav.org
(cherry picked from commit 0e830094ad)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 03:06:10 +01:00
b3cc4bd18f avcodec/vc1: reset fcm/field_mode in non advanced header parsing
Fixes NULL pointer dereference
Fixes: signal_sigsegv_1ab8bf4_2847_cov_4254117347_SA10091.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b51e935477)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 03:06:10 +01:00
ca9d302519 avcodec/takdec: always check bits_per_raw_sample
Fixes out of array access
Fixes: asan_heap-oob_19c7a94_6470_cov_1453611734_luckynight-partial.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f58eab1512)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 03:06:10 +01:00
e925fd215f avcodec/vmnc: Check that rectangles are within the picture
Prevents out of array accesses with CODEC_FLAG_EMU_EDGE

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

Conflicts:

	libavcodec/vmnc.c

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 03:06:10 +01:00
5e01cd3b69 dnxhdenc: fix mb_rc size
Fixes out of array access with RC_VARIANCE set to 0

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 03:06:10 +01:00
2256b2a3c1 pthread_frame: flush all threads on flush, not just the first one
avcodec_flush_buffers() must release all internally held references
according to its documentation, for which all the threads need to be
flushed.

Bug-Id: vlc/9665
(cherry picked from commit d1f9563d50)

Conflicts:
	libavcodec/pthread_frame.c
2014-03-04 01:39:11 +01:00
89c917fcd9 rtpdec_asf: Copy the need_parsing field from the chained demuxer
This fixes playback of mp3 streams in rtp/asf. This used to work
until 950482bf, but mostly by coincidence.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 2aec9e228c)

Fixes ticket #3223
2014-01-27 15:48:27 +01:00
8a38deb789 Fix compilation on ARM with android gcc 4.7
With the current code it fails due to running out
of registers.
So code the store offsets manually into the assembler
instead.
Passes "make fate-dts".

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 8067f55edf)

Fixes ticket #2756.
2014-01-26 16:23:58 +01:00
4fdcb1e1b7 Allow decoding of slightly broken Nikon avi files.
Fixes ticket #3330.
(cherry picked from commit f9c2d4d17e)

Conflicts:
	libavformat/avidec.c
2014-01-20 22:40:36 +01:00
b902ba478c avcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated
Fixes Ticket 3245
(cherry picked from commit ad8d063f23)
2014-01-20 22:39:50 +01:00
f0fabcc6ed avcodec/mjpegdec: Dont treat the lack of a startcode differently from end of the bitstream
Fixes Ticket3303

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

Conflicts:
	libavcodec/mjpegdec.c
2014-01-19 14:43:47 +01:00
bd29764c61 avcodec/aacdec: Dont fail if channels arent known yet
Fixes Ticket3312

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

Conflicts:
	libavcodec/aacdec.c
2014-01-19 14:41:05 +01:00
d81ccf1fb2 avcodec/mjpegdec: only run EOI emulation code when there was a scan
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 361e27a3d8)
2014-01-19 14:38:03 +01:00
67d20495f5 avcodec/mjpegdec: update cur_scan also for non-LS jpeg
This should make no difference but the variable will be used in a subsequent commit

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

Conflicts:
	libavcodec/mjpegdec.c
2014-01-19 14:37:32 +01:00
5a0a156e88 cmdutils: update year
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n1.2.5
2014-01-16 02:53:32 +01:00
884094deba Update for 1.2.5
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 02:52:53 +01:00
db20610c49 wmaprodec: Fix null pointer dereference in decode_frame()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c7a7605656)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 01:58:13 +01:00
15a736483e h264: check mb_width/height
Fixes inconsistency that leads to out of array accesses with threads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:52:56 +01:00
c8b90c7cd5 h264: Always decode MMCOs into temprary array
When decoding succeeded the array is copied into the permanent one.
This prevents inconsistencies
Fixes assertion failure

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:52:56 +01:00
97978b7ae8 h264: move the default_ref_list_done check down after its inputs have been written
Fixes out of array read

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:52:56 +01:00
3f2efac0fe h264: Move slice_table clean out of frame_start
Fixes inconsistency ultimately leading to an out of array read

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:52:56 +01:00
b9058f58bd h264_refs: Check for attempts to assign pictures to short & long.
Fixes null pointer dereference

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:49:11 +01:00
47faf347a0 h264_cavlc: fix assertion failure due to reading too long vlc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 10ece44d09)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:48:58 +01:00
3d1e4b7ca5 avcodec/aacps: fix number of bands used with ipd/opd
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f861d16355f_1664_File1_fixed.aac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6433b393ba)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:47:25 +01:00
a2bea0df0e aacps: correct opdipd code to match spec
This fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:47:18 +01:00
483b2016bb avcodec/ansi: Fix right/bottom end checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6021615bbe)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:45:22 +01:00
271f5d68b9 avcodec/ansi: Check x/y
This prevents out of array accesses

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:45:07 +01:00
dee327b0e7 shorten: fix "off by padding" bug
Fixes array overread

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:42:23 +01:00
e438fd3be9 avcodec/lcldec: Check that dimensions are a multiple of the subsample factors
Other dimensions would not work correctly currently,
also ask for a sample for files that fail this check.

This fixes an integer overflow leading to out of array
accesses.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
3d380ffde9 avformat/vqf: check number of channels before use.
Fixes division by zero

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
84b100396e dxa: check vectors of 2x2 motion blocks
Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
7855083443 dxa: check vectors of 4x4 motion blocks
Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
ca7f64e0ac shorten: allocate space for padding
Fixes array overread

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
2b26f8c6bf evrcdec: fix sign error
The specification wants round(abs(x))) * sign(x) which is
equivakent to round(x)

Fixes out of array access

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
6e3697b985 eamad: Check against minimum supported dimensions
Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
c93501687c xan: Check for overlapping copies
No valid samples i found use such copies

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
bb6f466794 avcodec/bitstream: check codes in ff_init_vlc_sparse()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6998af4a40)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
08a319549a avcodec/bitstream: Check bits in ff_init_vlc_sparse()
Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
d1da1c8384 avcodec/mpegvideo_motion: Use a field from the current frame if the last is unavailable in DMV & 16x8
Fixes null pointer dereference

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
8ded3738d1 avcodec/c93: Check for block overlap.
Fixes overlapping memcpy()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
a2186a8054 avcodec/mpegvideo_motion: Check P field references
If a reference is unavailable use a field from the current
picture
Fixes null pointer dereference

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
a92b73da99 svq3: use memmove to avoid overlap in memcpy.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4c8ce750ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
ab38b39059 evrcdec: use memmove() instead of memcpy() when regions can overlap.
This occurs also with valid files.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
5dde8ba59e avutil/log: skip IO calls on empty strings
These occur when no context is set for example, thus they are common

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
b841869477 avcodec/error_resilience: check that er is supported before attempting to read the status of the previous slice
Fixes incorrectly set error_occured and improves speed

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
3488e9e269 avcodec/error_resilience: factor er_supported() check out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit afb18c5578)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
5a8d78ab7f avcodec/libopusenc: change default frame duration to 20 ms
20 ms is used by libopus encoder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 74906d3727)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
dea7f1c62e avcodec: move end zeroing code from av_packet_split_side_data() to avcodec_decode_subtitle2()
This code changes the input packet, which is read only and can in
rare circumstances lead to decoder errors. (i run into one of these in
the audio decoder, which corrupted the packet during av_find_stream_info()
so that actual decoding that single packet failed later)
Until a better fix is implemented, this commit limits the problem.
A better fix might be to make the subtitle decoders not depend on
data[size] = 0 or to copy their input when this is not the case.
(cherry picked from commit 01923bab98)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00