Commit Graph

50792 Commits

Author SHA1 Message Date
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
c7027ae738 h264: Do not treat the initial frame special in handling of frame gaps
The not handling of frame gaps has lead to the lack of a dummy reference
frame, which has lead to the failure of decode_slice_header() which has
lead to one SEI recovery message being skiped which had introduced a
slightly suboptimal recovery point for at least 1 h264 file compared to
JM.

Found-by: Carl & BugMaster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e5ef1c5c3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
971b13752d avformat/thp: force moving forward
Fixes infinite loop
Fixes Ticket3098

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
d0ed672484 avformat/thp: fix variable types to avoid overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2b1056e4e2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
751e684aae avcodec/jpeglsdec: check err value for ls_get_code_runterm()
Fixes infinite loop
Fixes Ticket3086

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
803ca5c349 avutil/opt: initialize ret
Fixes CID1108610
Fixes use of uninitialized variable

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
252002aec1 avcodec/utils: add some saftey checks to add_metadata_from_side_data()
This fixes potential overreads with crafted files.

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

Conflicts:

	libavcodec/utils.c
2014-01-16 00:35:12 +01:00
d805a51713 avcodec/avpacket/av_packet_split_side_data: ensure that side data padding is initialized
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 240fd8c96f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
45dd7df83b avfilter/ff_insert_pad: fix order of operations
Fixes out of bounds access
Fixes CID732170
Fixes CID732169

No filter is known to use this function in a way so the issue can be reproduced.

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

Conflicts:

	libavfilter/avfilter.c
(cherry picked from commit 86591b244f3a27293153896813f5569b49b2f5c0)

Conflicts:

	libavfilter/avfilter.c
2014-01-16 00:35:12 +01:00
da82be0cc0 ffserver: strip odd chars from html error messages before sending them back
Fixes Ticket3034

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
b8b77aefe8 avcodec/ffv1dec: fix format detection
Fixes crash with carefuly designed files.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-16 00:35:12 +01:00
30147f14d4 Do not read mkv audio bit_depth if bits_per_coded_sample is already set.
This allows decoding broken mkv files containing G.726 audio.
(cherry picked from commit 1132937077)
2014-01-16 00:28:49 +01:00
d6a705d778 Do not set mkv bit_depth to av_get_bytes_per_sample() for G.726.
The value is wrong and leads to broken files.
(cherry picked from commit 565102dcac)
2014-01-16 00:28:15 +01:00
e24b33cd68 avcodec/msvideo1enc: fix SKIPS_MAX
Fixes Ticket3270

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fb8f5d0510)
2014-01-09 11:45:45 +01:00
6f7fd2f589 Use the h264 parser when decoding VSSH in avi.
Fixes ticket #3261 visually.

Analyzed-by: Michael Doilnitsyn
(cherry picked from commit 94cf4f8bac)

Conflicts:
	libavformat/avidec.c
2014-01-08 10:24:03 +01:00
f974c54909 avformat/mxfdec: detect loops during header parsing
The header parser uses forward and backward parsing, making the
bulletproof prevention of loops difficult, thus this simple
detection code.
If someone improves the forward/backward parsing so it cannot loop
then this commit should be reverted

Fixes Ticket3278

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1c010fd035)
2014-01-08 10:22:31 +01:00
71b3235cea avformat/oggdec: dont read timestamps from EOS pages of ogm videos
Some muxers store invalid timestamps there, which breaks seeking
Fixes Ticket2739

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5e0c7eab2a)
2014-01-05 17:27:29 +01:00
dcd1acce1a configure: Special case libfreetype test
Include the freetype header, in-directly through a macro, like it
is done in the drawtext filter. Do not break if the header is moved.

Unfortunately the drawtext filter included the file where the include
macros are defined in a wrong way. This is not needed and breaks the
build. Remove that #include line too.

(cherry picked from commit cea5812fa7)

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>

Conflicts:
	configure
2013-12-29 11:37:29 +01:00
5c502e5d41 nutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard the 2nd
This fixes an assertion failure and regression and restores previous behaviour
Fixes Ticket3197

An alternative would be to fail hard in this case and refuse to mux such data.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit de2a2caf4d)
2013-12-24 08:06:42 +01:00