Commit Graph

66586 Commits

Author SHA1 Message Date
Michael Niedermayer
24d725f455 avcodec/utils: Align dimensions by at least their chroma sub-sampling factors.
Fixes: out of array accesses
Fixes: asan_heap-oob_112c6b3_13_012.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit df74811cd5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Michael Niedermayer
66fcf1fa40 avcodec/dnxhddec: treat pix_fmt like width/height
Fixes out of array accesses
Fixes: asan_heap-oob_22c9a39_16_015.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f3c0e0bf6f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Michael Niedermayer
c7b7e0790c avcodec/dxa: check dimensions
Fixes out of array access
Fixes: asan_heap-oob_11222fb_21_020.dxa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e70312dfc2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Michael Niedermayer
3f3e5f8f60 avcodec/dirac_arith: fix integer overflow
Fixes: asan_heap-oob_1078676_9_008.drc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 39680cacee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Michael Niedermayer
8e95ddbe82 avcodec/diracdec: Tighter checks on CODEBLOCKS_X/Y
Fixes very long but finite loop
Fixes: asan_heap-oob_107866c_42_041.drc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5145d22b88)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Michael Niedermayer
8cba067fe5 avcodec/diracdec: Use 64bit in calculation of codeblock coordinates
Fixes integer overflow
Fixes out of array read
Fixes: asan_heap-oob_107866c_42_041.drc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 526886e606)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Michael Niedermayer
73c6520c09 avcodec/sgidec: fix count check
Fixes: asan_heap-oob_22b30d4_39_038.sgi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a050cf0c45)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Michael Niedermayer
ca47574e16 avcodec/sgidec: fix linesize for 16bit
Fixes: asan_heap-oob_22b30d4_39_038.sgi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3b20ed8548)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Michael Niedermayer
045670a6f7 avcodec/hevc_ps: Check default display window bitstream and skip if invalid
Fixes Ticket4035

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:14 +01:00
Christophe Gisquet
30a0622a5d avcodec/tiffenc: properly compute packet size
The bytes per row is a better indication of it.

Helps resolving ticket #3874 by fixing ffmpeg's encoder and transforming
the issue in a issue with non-compliant decoders. ffmpeg's one is ok,
but unfortunately, many others aren't handling correctly unusual chroma
samplings.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:13 +01:00
Lukasz Marek
e4d921dc71 lavd: export all symbols with av_ prefix
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
(cherry picked from commit e493814d61)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:13 +01:00
Michael Niedermayer
2185103bcd avformat/mxfdec: Fix termination of mxf_data_essence_container_uls
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e3b28f10bb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:13 +01:00
Michael Niedermayer
bf7ee2524b postproc: fix qp count
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0b7e5d0d75)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:13 +01:00
Michael Niedermayer
5a1efc7b85 postproc/postprocess: fix quant store for fq mode
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 941aaa39e8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:13 +01:00
Karl Kiniger
71af22097d vf_drawtext: add missing clear of pointers after av_expr_free()
Fixes segfault when using sendcmd with drawtext.

Since LIBAVFILTER_VERSION_MAJOR 5 FF_API_DRAWTEXT_OLD_TIMELINE
evaluates to 0.

Signed-off-by: Karl Kiniger <karl.kiniger@med.ge.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 903156aa8a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:13 +01:00
Christophe Gisquet
f3d34cff76 utvideoenc: properly set slice height/last line
Mimic decoder and obey sampling.

Does not affect fate tests for utvideo.
Fixes ticket #3949.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:13 +01:00
Michael Niedermayer
81b38caf21 swresample/swresample: fix sample drop loop end condition
Fixes Ticket3985

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:28:13 +01:00
Michael Niedermayer
20071ff1a4 Merge commit 'ca8c62d187fdca13979379fb2ab172ed662aa2f8' into release/2.4
* commit 'ca8c62d187fdca13979379fb2ab172ed662aa2f8':
  resample: Avoid off-by-1 errors in PTS calcs.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:22:09 +01:00
Michael Niedermayer
3b7db9c4f5 Merge commit 'e443165c323406d01da7e7930f042d265d01fb35' into release/2.4
* commit 'e443165c323406d01da7e7930f042d265d01fb35':
  imc: fix order of operations in coefficients read

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:21:40 +01:00
Michael Niedermayer
0ddcee172e Merge commit '0b41eeac45fb7f7ad6d3f4fc846b00d108824b0b' into release/2.4
* commit '0b41eeac45fb7f7ad6d3f4fc846b00d108824b0b':
  hevc_mvs: make sure to always initialize the temporal MV fully

Conflicts:
	libavcodec/hevc_mvs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:06:25 +01:00
Michael Niedermayer
13ecdb06f8 Merge commit 'de31f857077a52714f3a2f2e92ac037d42d37769' into release/2.4
* commit 'de31f857077a52714f3a2f2e92ac037d42d37769':
  hevc_mvs: initialize the temporal MV in case of missing ref

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 13:05:46 +01:00
Timothy B. Terriberry
ca8c62d187 resample: Avoid off-by-1 errors in PTS calcs.
The rounding used in the PTS calculations in filter_frame() does
not actually match the number of samples output by the resampler.
This leads to off-by-1 errors in the timestamps indicating gaps and
underruns, even when the input timestamps are all contiguous.

Bug-Id: 753

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 6cbbf0592f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-18 05:11:23 +02:00
Vittorio Giovara
e443165c32 imc: fix order of operations in coefficients read
Reported-by: Ruoyu <liangry@ucweb.com>
2014-10-15 14:51:19 +01:00
Anton Khirnov
0b41eeac45 hevc_mvs: make sure to always initialize the temporal MV fully
The spec requires this.

Fixes uninitialized reads on some samples.

Remove now unnecessary initialization of the whole merge candidate list.
2014-10-08 12:31:08 +01:00
Anton Khirnov
de31f85707 hevc_mvs: initialize the temporal MV in case of missing ref
The caller expects the MV to always be initialized.
2014-10-08 12:30:54 +01:00
Alexander Strasser
d61454e7c1 avformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type glob)
Fixes ticket #3948

Based-on-patch-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e079d43af8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-05 03:58:09 +02:00
Michael Niedermayer
b02e4faa3e avformat/img2dec: Support -loop with pipes
Fixes Ticket3976

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-05 01:55:54 +02:00
Michael Niedermayer
09256527be Update for 2.4.2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-05 00:53:35 +02:00
Michael Niedermayer
84d26ab6eb avcodec/on2avc: Check number of channels
Fixes out of array access
Fixes: asan_heap-oob_4da4f3_7_asan_heap-oob_4da4f3_173_Xmen_avc_500.vp6

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
1d99adc953 avcodec/hevc: fix chroma transform_add size
Fixes accessing misaligned address
Fixes: signal_sigsegv_1feb99c_10_signal_sigsegv_2d1d35c_79_cov_691940146_EXT_A_ericsson_3.bit

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
67991f3a3e avcodec/h264: Check mode before considering mixed mode intra prediction
Fixes out of array read
Fixes: asan_heap-oob_e476fc_2_asan_heap-oob_1333ec6_61_CAMACI3_Sony_C.jsv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
32e8922faf avformat/mpegts: use a padded buffer in read_sl_header()
Fixes overread
Fixes: asan_heap-oob_84f75d_8_asan_heap-oob_a2a00a_341_mbc.ts

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
32dbd1f342 avformat/mpegts: Check desc_len / get8() return code
Fixes out of array read
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
eefc3ca7be avcodec/vorbisdec: Fix off by 1 error in ptns_to_read
Fixes read of uninitialized memory
Fixes: asan_heap-uaf_18dac2b_9_asan_heap-uaf_22eb375_208_beta3_test_small.ogg

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Thomas Volkert
a16558e122 sdp: add support for H.261
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1c4c78ee40)

Conflicts:

	libavformat/version.h
2014-10-04 23:52:29 +02:00
Michael Niedermayer
506368f563 avcodec/svq3: Dont memcpy AVFrame
This avoids out of array accesses

Fixes: asan_heap-uaf_21f42e4_9_asan_heap-uaf_21f42e4_278_gl2.mov

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
c0c24bc9b3 avcodec/smc: fix off by 1 error
Fixes out of array access
Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
b89f279cd6 avcodec/qpeg: fix off by 1 error in MV bounds check
Fixes out of array access
Fixes: asan_heap-oob_153760f_4_asan_heap-oob_1d7a4cf_164_VWbig6.avi

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
7f90eef87a avcodec/gifdec: factorize interleave end handling out
also change it to a loop
Fixes out of array access
Fixes: asan_heap-oob_ca5410_8_asan_heap-oob_ca5410_97_ID_LSD_Size_Less_Then_Data_Inter_3.gif

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
71f0a3c4ad avcodec/cinepak: fix integer underflow
Fixes out of array access
Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
d9bef14e41 avcodec/pngdec: Check bits per pixel before setting monoblack pixel format
Fixes out of array accesses
Fixes: asan_heap-oob_14dbfcf_4_asan_heap-oob_1ce5767_179_add_method_small.png

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
4b4ed88e89 avcodec/pngdec: Calculate MPNG bytewidth more defensively
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e830902934)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
f6476944e1 avcodec/tiff: more completely check bpp/bppcount
Fixes pixel format selection
Fixes out of array accesses
Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
03d30d4c2c avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks
Fixes out of array access
Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
853a27e345 avcodec/h263dec: Fix decoding messenger.h263
Fixes http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263
Fixes regression since b239f3f6

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:29 +02:00
Michael Niedermayer
f7c0f8355e avcodec/utils: Add case for jv to avcodec_align_dimensions2()
Fixes out of array accesses
Fixes: asan_heap-oob_12304aa_8_asan_heap-oob_4da4f3_300_intro.jv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:28 +02:00
Michael Niedermayer
6f5c505109 avcodec/mjpegdec: check bits per pixel for changes similar to dimensions
Fixes out of array accesses
Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:28 +02:00
Michael Niedermayer
b29f9897e3 avcodec/jpeglsdec: Check run value more completely in ls_decode_line()
previously it could have been by 1 too large
Fixes out of array access
Fixes: asan_heap-oob_12240f5_1_asan_heap-oob_12240f5_448_t8c1e3.jls
Fixes: asan_heap-oob_12240f5_1_asan_heap-oob_12240f5_448_t8nde0.jls
Fixes: asan_heap-oob_12240fa_1_asan_heap-oob_12240fa_448_t16e3.jls

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:28 +02:00
Michael Niedermayer
1d987a34d8 avformat/hlsenc: export inner muxer timebase
Fixes "Non-monotonous DTS in output stream 0:0"
Fies Ticket 3797

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

Conflicts:

	libavformat/hlsenc.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:28 +02:00
Reimar Döffinger
6099d1ca0e configure: add noexecstack to linker options if supported.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit b7082d953f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 23:52:28 +02:00