summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* doc/utils: fix typo for min() descriptionrelease/2.1Paul B Mahol2016-03-021-1/+1
| | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> (cherry picked from commit bdf474bcff29f5b40fe14f6fa1dbe10e69c73ab7) Signed-off-by: Timothy Gu <timothygu99@gmail.com>
* swscale/x86/rgb2rgb_template: Do not crash on misaligend strideMichael Niedermayer2015-12-151-1/+4
| | | | | | | Fixes Ticket5013 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 80bfce35ccd11458e97f68f417fc094c5347070c)
* avcodec/ffv1dec: Clear quant_table_count if its invalidMichael Niedermayer2015-12-061-0/+1
| | | | | | | | | | | | Fixes deallocation of corrupted pointer Fixes: 343dfbe142a38b521ed069dc4ea7c03b/signal_sigsegv_421427_4074_ffb11959610278cd40dbc153464aa254.avi No releases affected Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e04126072e984f8db5db9da9303c89ae01f7d6bb) Fixes ticket #5052.
* avcodec/ffv1dec: Print an error if the quant table count is invalidMichael Niedermayer2015-12-061-1/+3
| | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a8b254e436dce2f5c8c6459108dab4b02cc6b79b)
* avcodec/ffv1dec: Check for 0 quant tablesMichael Niedermayer2015-12-061-1/+1
| | | | | | | | | 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)
* doc/filters/drawtext: fix centering exampleAndrey Utkin2015-12-011-1/+1
| | | | | | | 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>
* videodsp: don't overread edges in vfix3 emu_edge.Ronald S. Bultje2015-10-251-4/+11
| | | | | | Fixes trac ticket 3226. Also see Andreas' analysis in https://bugs.debian.org/801745, which was very helpful. (cherry picked from commit 52f84d82bdf1851ecfcc412c1719e5f6f3396209)
* avcodec/h264_mp4toannexb_bsf: Reorder operations in nal_size checkMichael Niedermayer2015-10-101-1/+1
| | | | | | | Fixes Ticket4778 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 2bb54b82b5094fd906aa28c0443be08c95662a31)
* avformat/oggenc: Check segments_count for headers tooMichael Niedermayer2015-10-101-4/+7
| | | | | | | | Fixes infinite loop and segfault in ogg_buffer_data() Fixes Ticket4806 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 81a8701eb52d2b6469ae16ef442ce425388141b7)
* avformat/avidec: Workaround broken initial frameMichael Niedermayer2015-10-101-1/+2
| | | | | | | Fixes Ticket4851 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 3e2ef00394b8079e93835d47c993868229f07502)
* avcodec/ffv1: seperate slice_count from max_slice_countMichael Niedermayer2015-10-104-11/+15
| | | | | | | | | | | | 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
* avcodec/mp3: fix skipping zeroswm42015-10-101-1/+3
| | | | | | | | | | | | | | | | | | 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)
* MAINTAINERS: Remove myself as leaderMichael Niedermayer2015-07-311-1/+0
| | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit f2c58931e629343f7d68258cc2b2d62c5f501ba5) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/swfdec: Do not error out on pixel format changesMichael Niedermayer2015-07-081-4/+2
| | | | | | | | | Instead print an error and continue Fixes Ticket4702 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 6a1204a1a46674084b1e6b92562f81aaab7aac69)
* avcodec/x86/h264_weight: handle weight1=128Michael Niedermayer2015-06-191-0/+3
| | | | | | | Fix ticket4596 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e1009665759d4a3938dd2dd07b7e84d8bc9c5290)
* avformat/mov: Mark avio context of decompressed atoms as seekableMichael Niedermayer2015-06-191-0/+1
| | | | | | | Fixes Ticket4329 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 8ce564ea280b61d21eebf8a2fd741f792ce81638)
* avfilter/x86/vf_hqdn3d: Fix register typesMichael Niedermayer2015-06-191-2/+2
| | | | | | | Fixes Ticket4301 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 52fc3e372f8ed4de5735abed1f7f7569fe37b023)
* lavfi/fade: Do not overread input buffer.Carl Eugen Hoyos2015-05-171-1/+3
| | | | (cherry picked from commit ab3ff19f08b7a83e320c39ab066f289c242b8030)
* Update for 2.1.8n2.1.8Michael Niedermayer2015-04-303-3/+3
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* nutdec: fix illegal count check in decode_main_headerAndreas Cadhalpun2015-04-281-1/+1
| | | | | | | | | | | | | | | The existing check has two problems: 1) i + count can overflow, so that the check '< 256' returns true. 2) In the (i == 'N') case occurs a j-- so that the loop runs once more. This can trigger the assertion 'nut->header_len[0] == 0' or cause segmentation faults or infinite hangs. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 7c24ca1bda2d4df1dc9b2b982941be532d60da21) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* nutdec: check chapter creation in decode_info_headerAndreas Cadhalpun2015-04-281-0/+4
| | | | | | | | | This fixes a segmentation fault when accessing the metadata. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 3ff1af2b0db7132d5717be6395227a94c8abab07) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* nutdec: check for negative frame rate in decode_info_headerAndreas Cadhalpun2015-04-281-1/+2
| | | | | | | | | | A negative frame rate triggers an av_assert2 in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 6621105877ce0d65724a8ab60b3a50160adbe65d) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ffmpeg: remove incorrect network deinitMichael Niedermayer2015-04-281-1/+0
| | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e2877bdf3862325c2982c3237d9bf28f1bbf793f) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* apedec: prevent out of array writes in decode_array_0000Andreas Cadhalpun2015-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | s->decoded_buffer is allocated with a min_size of: 2 * FFALIGN(blockstodecode, 8) * sizeof(*s->decoded_buffer) Then it is assigned to s->decoded[0] (and s->decoded_buffer + FFALIGN(blockstodecode, 8) to s->decoded[1]) and passed as out buffer to decode_array_0000. In this function 64 elements of the out buffer are written unconditionally and outside the array if blockstodecode is too small. This causes memory corruption, leading to segmentation faults or other crashes. Thus change decode_array_0000 to write at most blockstodecode elements of the out buffer. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 699341d647f7af785fb8ceed67604467b0b9ab12) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* apedec: set s->samples only when init_frame_decoder succeededAndreas Cadhalpun2015-04-281-1/+1
| | | | | | | | | | | | Otherwise range_start_decoding is not necessarily run and thus ctx->rc.range still 0 in range_dec_normalize leading to an infinite loop. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 464c49155ce7ffc88ed39eb2511e7a75565c24be) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* tests/fate-run: do not attempt to parse tiny_psnrs output if it failedMichael Niedermayer2015-04-241-1/+1
| | | | | | | | | | | | | | This avoids confusing syntax errors with awk later Likely fixes awk errors at: http://buildd.debian-ports.org/status/fetch.php?pkg=ffmpeg&arch=sparc64&ver=7%3A2.6.2-1&stamp=1428928967 Reviewed-by: Timothy Gu <timothygu99@gmail.com> Thanks-to: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> for the link Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c0d847e457c1ef72843a63853f1135d52b74131e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alac: reject rice_limit 0 if compression is usedAndreas Cadhalpun2015-04-241-0/+5
| | | | | | | | | | If rice_limit is 0, k can be 0 in decode_scalar, which calls show_bits(gb, k). Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 4b657a1b1eedcf38bcf36e89a2f4be6f76b5ce09) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alsdec: only adapt order for positive max_orderAndreas Cadhalpun2015-04-231-1/+1
| | | | | | | | | | For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 58d605ee9b3277289278dc40e022311f8e083833) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: Reset global flag on deinitVittorio Giovara2015-04-231-0/+1
| | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 32da94fa7f73ac749e0a1e2f20499fad2f6f57fe) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mpeg4videodec: only allow a positive lengthAndreas Cadhalpun2015-04-221-2/+2
| | | | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit b3408ae4c64cb674b1d5f0f30171759113ce722a) Conflicts: libavcodec/mpeg4videodec.c
* alsdec: check sample pointer range in revert_channel_correlationAndreas Cadhalpun2015-04-221-7/+27
| | | | | | | | | | | | | | Also change the type of begin, end and smp to ptrdiff_t to make the comparison well-defined. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit afc7748d1f6abc4b3b1cc957b0fa6941837db3d0) Conflicts: libavcodec/alsdec.c
* avformat/utils: Ensure that AVFMT_FLAG_CUSTOM_IO is set before useMichael Niedermayer2015-04-221-0/+3
| | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit ba631b791435c395361e2026fc7419b341e57813) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alsdec: validate time diff indexAndreas Cadhalpun2015-04-221-0/+8
| | | | | | | | | | | | | If begin is smaller than t, the subtraction 'begin -= t' wraps around, because begin is unsigned. The same applies for end < t. This causes segmentation faults. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit faf9fe2c224ea81a98afd53e2f0be0a2e13aeca9) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/alsdec: Use av_mallocz_array() for chan_data to ensure the arrays ↵Michael Niedermayer2015-04-221-2/+2
| | | | | | | | | | | never contain random data Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 7e104647a3556fc61a139483cee1cb7dfa2dc5bd) Conflicts: libavcodec/alsdec.c
* alsdec: ensure channel reordering is reversibleAndreas Cadhalpun2015-04-221-1/+5
| | | | | | | | | | | | | If the same idx is used for more than one i, at least one entry in sconf->chan_pos remains uninitialized. This can cause segmentation faults. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit ef16501aebed43e34a3721336e8bee732eca2877) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ac3: validate end in ff_ac3_bit_alloc_calc_maskAndreas Cadhalpun2015-04-221-0/+3
| | | | | | | | | | | | | | This fixes an invalid read if end is 0: band_end = ff_ac3_bin_to_band_tab[end-1] + 1; Depending on what is before the array, this can cause stack smashing, when band_end becomes too large. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit bc4fee7f2a51635fa3c0f61d1e5164da1efeded3) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* aacpsy: avoid psy_band->threshold becoming NaNAndreas Cadhalpun2015-04-221-1/+4
| | | | | | | | | | | | | | | | | If band->thr is 0.0f, the division is undefined, making norm_fac not a number or infinity, which causes psy_band->threshold to become NaN. This is passed on to other variables until it finally reaches sce->sf_idx and is converted to an integer (-2147483648). This causes a segmentation fault when it is used as array index. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e224aa41917454e7b5c23d9f2541425743ce595a) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* aasc: return correct buffer size from aasc_decode_frameAndreas Cadhalpun2015-04-221-1/+1
| | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 0be54ad280cf114c02306b7063147e8379f8ed1e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* aacdec: consistently use avctx for logging in decode_eld_specific_configAndreas Cadhalpun2015-04-221-1/+1
| | | | | | | | | | ac may be NULL and then accessing ac->avctx results in a segmentation fault. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 5b75689b987e4c4dd4f34d5c8be389547e9cc701) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* msrledec: use signed pixel_ptr in msrle_decode_pal4Andreas Cadhalpun2015-04-221-1/+1
| | | | | | | | | | | | | | | | This fixes segmentation faults, when pic->linesize[0] is negative. In that case 'line * pic->linesize[0] + pixel_ptr' is treated as unsigned and wraps around. This reverts commit 7d78a964. The problem was introduced in commit f7e1367f, which should obsolete that commit. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit ae6fd7300b4e9f81d3b5ba201096ffe7cccf26fb) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/aacdec: Fix storing state before PCE decodeMichael Niedermayer2015-04-221-1/+1
| | | | | | | | | Fixes Ticket4460 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e88b3852aefaa39b2170ef185ad03dda18732821) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* tests: Fix test name for pixfmts tests(cherry picked from commit ↵Timothy Gu2015-04-221-0/+2
| | | | | | e1ee0521a698809ed216e9e5c11bd2bbb466ed04) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* tests/fate.sh: report different status for different errorsTimothy Gu2015-04-221-3/+3
| | | | | | | | | The order of error codes will be useful in my future fateserver patches. Signed-off-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit cc0057a31c7097839f9c4e4da61e2933b5b0e055) Signed-off-by: Timothy Gu <timothygu99@gmail.com>
* avcodec/h264_refs: Do not set reference to things which dont existMichael Niedermayer2015-04-221-1/+1
| | | | | | | | | | | Fixes deadlock Fixes Ticket4428 Fixes Ticket4429 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 429de043202286a2b5bcc082cc02de860b734db2) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avutil/pca: Check for av_malloc* failuresMichael Niedermayer2015-04-221-0/+8
| | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit dadc43eee4d9036aa532665a04720238cc15e922) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/msrledec: restructure msrle_decode_pal4() based on the line number ↵Michael Niedermayer2015-04-221-14/+11
| | | | | | | | | | | | | instead of the pixel pointer Fixes out of array access Fixes: da14e86d8462be6493eab16bc2d40f88/asan_heap-oob_204cfd2_528_cov_340150052_COMPRESS.BMP Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit f7e1367f58263593e6cee3c282f7277d7ee9d553) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/hevc_ps: Check cropping parameters more correctlyMichael Niedermayer2015-04-221-1/+2
| | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 06c70d45373dedc600f28e345685b130b60203c1) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/hevc_ps: More complete window resetMichael Niedermayer2015-04-221-4/+2
| | | | | | | | | | | | Fixes out of array read Fixes: signal_sigsegv_35bcf26_471_cov_2806540268_CAINIT_A_SHARP_4.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 57e5812198aada016e9ba4149123c541f8c8a7ec) Conflicts: libavcodec/hevc_ps.c
* hevc: make the crop sizes unsignedAnton Khirnov2015-04-221-4/+4
| | | | | | (cherry picked from commit c929659bdd7d2d5848ea52e685a3164c7b901bb0) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/dnxhddec: Check that the frame is interlaced before using cur_fieldMichael Niedermayer2015-04-221-1/+1
| | | | | | | | | Fixes Ticket4227 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 2c660e34cf3c2b77cd2bef6f292920334dfd9192) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>