1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

75471 Commits

Author SHA1 Message Date
Michael Niedermayer
ef32b162e8 avcodec/idcinvideo: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a2b8dde65947bfabf42269e124ef83ecf9c5974a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:26 +01:00
Michael Niedermayer
41b1ec0810 avcodec/cinepak: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 121be310607879841d19a34d9f16d4fe9ba7f18c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:26 +01:00
Michael Niedermayer
e3f8b32279 avcodec/8bps: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 042faa847feea820451c474af0034fd3de9cff82)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:26 +01:00
Michael Niedermayer
fe4c6aeb99 avcodec/dvdsubdec: Fix off by 1 error
Fixes out of array read

Found-by: Thomas Garnier using libFuzzer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c92f55847a3d9cd12db60bfcd0831ff7f089c37c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:26 +01:00
Michael Niedermayer
3177ea512f avcodec/dvdsubdec: Fix buf_size check
Fixes out of array access

Found-by: Thomas Garnier using libFuzzer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 25ab1a65f3acb5ec67b53fb7a2463a7368f1ad16)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:26 +01:00
Ronald S. Bultje
e25441912b vp9: change order of operations in adapt_prob().
This is intended to workaround bug "665 Integer Divide Instruction May
Cause Unpredictable Behavior" on some early AMD CPUs, which causes a
div-by-zero in this codepath, such as reported in Mozilla bug #1293996.

Note that this isn't guaranteed to fix the bug, since a compiler is free
to reorder instructions that don't depend on each other. However, it
appears to fix the bug in Firefox, and a similar patch was applied to
libvpx also (see Chrome bug #599899).

(cherry picked from commit be885da3427c5d9a6fa68229d16318afffe67193)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:26 +01:00
Michael Niedermayer
abe16359ba avcodec/interplayvideo: Check side data size before use
Fixes out of array read

Found-by: Thomas Garnier using libFuzzer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 85d23e5cbc9ad6835eef870a5b4247de78febe56)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:26 +01:00
Michael Niedermayer
b9ab4db9f9 avformat/mxfdec: Check size to avoid integer overflow in mxf_read_utf16_string()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fecb3e82a4ba09dc11a51ad0961ab491881a53a1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Michael Niedermayer
8328c07fb1 avcodec/mpegvideo_enc: Clear mmx state in ff_mpv_reallocate_putbitbuffer()
This function must be called from the mb or slice encoding loop and MMX state may not
be clean there

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 03ec6b780cfae85b8bf0f32b2eda201063ad061b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Michael Niedermayer
865e3f5553 avcodec/utils: Clear MMX state before returning from avcodec_default_execute*()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4f96f9d1118e073d346d16be157fa5075434e7f2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Moritz Barsnick
d1c87a4a6f cmdutils: fix typos
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e5d27d7a7350e096eac9f8999d02bf48c3b3a69)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Moritz Barsnick
b480ca4dbd lavfi: fix typos
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f4e4bde1f4cff99d4ec59ed361ff9228b2050e6b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Moritz Barsnick
bb83ff8b41 lavc: fix typos
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3305f71025289970fb34473adce5d9c65d1af016)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Moritz Barsnick
d609986f39 tools: fix grammar error
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f71c98ee12f9a9e950b4a8fb6b1548fee91ba1f8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Shivraj Patil
b9ec80322b avutil/mips/generic_macros_msa: rename macro variable which causes segfault for mips r6
Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1cc13cd2a9b8d6d2810ec42454f328a1a0d5efa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-26 15:12:25 +01:00
Ronald S. Bultje
62b2b2195b videodsp: fix 1-byte overread in top/bottom READ_NUM_BYTES iterations.
This can overread (either before start or beyond end) of the buffer in
Nx1 (i.e. height=1) images.

Fixes mozilla bug 1240080.

(cherry picked from commit 0f88b3f82fafd536979993aeaafcb11a22266dbd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-05 03:06:45 +02:00
Michael Niedermayer
239f75d6c3 avformat/avidec: Check nb_streams in read_gab2_sub()
Fixes null pointer dereference
Fixes: 1/null_point.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2679ad4773aa356e7c3da5c68bc81f02a194617f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-05 03:06:45 +02:00
Michael Niedermayer
a772613100 avformat/avidec: Remove ancient assert
This assert can with crafted files fail, a warning is already printed
for this case.

Fixes assertion failure
Fixes:1/assert.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 14bac7e00d72eac687612d9b125e585011a56d4f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-05 03:06:45 +02:00
Sasi Inguva
ca216c71c7 lavc/movtextdec.c: Avoid infinite loop on invalid data.
Signed-off-by: Sasi Inguva <isasi@google.com>
(cherry picked from commit 7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 11:12:20 +02:00
Michael Niedermayer
ab737ab31d avcodec/ansi: Check dimensions
Fixes: 1.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 69449da436169e7facaa6d1f3bcbc41cf6ce2754)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-26 21:43:04 +02:00
Michael Niedermayer
69b00a7fb6 avcodec/cavsdsp: use av_clip_uint8() for idct
Fixes out of array read
Fixes: 1.swf

Found-by: 连一汉 <lianyihan@360.cn>
Tested-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0e318f110bcd6bb8e7de9127f2747272e60f48d7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-23 18:19:56 +02:00
Michael Niedermayer
d828aabf03 Changelog: Update n2.8.8 2016-09-18 01:18:35 +02:00
Michael Niedermayer
0ffdabb58d avformat/movenc: Check packet in mov_write_single_packet() too
Fixes assertion failure

Found-by: durandal117
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 28343139330f557e00293933a4697c7d0fc19c56)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
e1ab851da6 avformat/movenc: Factor check_pkt() out
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit deabcd2c05b2b01689d91394bbf3908da17234ed)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Xinzheng Zhang
0bdfdd6d2f avformat/utils: fix timebase error in avformat_seek_file()
When there is only one stream and stream_index has not specified,
The ts has been transferd by the timebase of stream0 without modifying the stream_index
In this condation it cause seek failure.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ecc04b4f2f29ac676e6c1d1ebf20ec45f5385f1e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
f8dcc9e718 avcodec/g726: Add missing ADDB output mask
Fixes: 1.poc
Fixes out of array read

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a5af1240fce845f645440364c1335e0f8e44ee6c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
175a95bfdd avcodec/avpacket: clear side_data_elems
Fixes null pointer dereference

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5e1bf9d8c0d2cdbbf17b06a5dfdf87a635b3203b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
ac60619acd avcodec/ccaption_dec: Use simple array instead of AVBuffer
This is simpler and fixes an out of array read, fixing it with AVBuffers
would be more complex

Fixes: e00d9e6e50e5495cc93fea41147b97bb/asan_heap-oob_12dcdbb_8798_b32a97ea722dd37bb5066812cc674552.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 752e6dfa3ea97e7901870bdd9e5a51f860607240)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
48c51b796a swscale/swscale_unscaled: Try to fix Rgb16ToPlanarRgb16Wrapper() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e57d99dd4e0d8fe2992da0d65b563580e35ce728)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
26eccf4bd8 swscale/swscale_unscaled: Fix packed_16bpc_bswap() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 47bc1bdafb0950ccf128eaa491d8fd7cc0978813)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
8ddeae57ae avformat/avidec: Fix infinite loop in avi_read_nikon()
Fixes: 360/test.poc

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e4e4a9cad7f21593d4bcb1f2404ea0d373c36c43)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Tobias Rapp
c32ce247a0 cmdutils: fix implicit declaration of SetDllDirectory function
Pre-processor check changed by commiter.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-29 20:02:24 -03:00
James Almer
2f9bc30956 cmdutils: check for SetDllDirectory() availability
It's only available on Windows XP or newer.

Should fix compilation with mingw32 using the default OS target.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-26 13:12:02 +02:00
Michael Niedermayer
562f2ba4ed avcodec/aacenc: Tighter input checks
Fixes occurance of NaN/Inf leading to assertion failures and out of array access
Fixes: d1c38a09acc34845c6be3a127a5aacaf/signal_sigsegv_3982225_6121_d18bd5451d4245ee09408f04badd1b83.wmv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 77bf96b04710b98a52aaddb93bfd32da0d506191)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-23 12:36:25 +02:00
Michael Niedermayer
5a96b4b443 libavcodec/wmalosslessdec: Check the remaining bits
Fixes assertion failure
Fixes: 24ebfda03228b5cc1ef792608cfba458/signal_sigabrt_7ffff6ae7c37_6473_3fa8a111dbc752b1a7c411c5ab79aaa4.wma

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 67318187fbba382d887f9581dde48a50842f1bea)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-21 21:11:47 +02:00
Michael Niedermayer
33ec0280f3 avcodec/diracdec: Check numx/y
Fixes division by 0
Fixes: 60261c4469ba3e11059890fb2832a515/asan_generic_135e694_2790_beb94eaa0aeb7d11c0437375a8964a99.drc

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a31e08fa1aa5c5f0518b8af850f28eb945268e66)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-20 19:40:26 +02:00
Michael Niedermayer
2b135f266d avcodec/indeo2: check ctab
Fixes out of array access
Fixes: 6b73fa392ac808f02e95a4e0a5770026/asan_static-oob_1b15f9a_1969_e7778535e5f27225fe0d6ded14721430.AVI

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9ffe44c5c75c485b4cbb12751e228f18da219df3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-19 14:47:39 +02:00
Michael Niedermayer
e965fedf7e avformat/swfdec: Fix inflate() error code check
Fixes infinite loop
Fixes endless.poc

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a453bbb68f3eec202673728988bba3bc76071761)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-19 11:03:50 +02:00
Michael Niedermayer
7132e71a84 Update for FFmpeg 2.8.8
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 22:26:37 +02:00
Michael Niedermayer
7a2329fac1 avcodec/h264: Put context_count check back
Fixes assertion failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f883f0b0bd0dac76b58e49f5c75cf9b497eecaa0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:14 +02:00
Hendrik Leppkes
65fff8e71a cmdutils: remove the current working directory from the DLL search path on win32
Reviewed-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3bf142c77337814458ed8e036796934032d9837f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
3988470ee3 avcodec/raw: Fix decoding of ilacetest.mov
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bbec14de3126dbc4e1ec2b32ed714dab173386aa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
3a6b27caf8 avcodec/ffv1enc: Fix assertion failure with non zero bits per sample
Fixes Ticket5736
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

(cherry picked from commit c1bfeda5a34631787e07702f7a3569a41751caeb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
942c3bfbdf avformat/oggdec: Fix integer overflow with invalid pts
If negative pts are possible for some codecs in ogg then the code needs to be
changed to use signed values.

Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c5cc3b08e56fc95665977544486bd9f06e4b7a72)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
486aa4fe39 ffplay: Fix invalid array index
Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6cd9a8b67a95a136ea15bfe3c3bab6cf5e6d1cc9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
da12d544bf avcodec/vp9_parser: Check the input frame sizes for being consistent
Suggested-by: BBB
Fixed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 77b0f3f26d33d4f46f274896e0583ad1f5936b7c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Kacper Michajłow
73e09e371b libavformat/rtpdec_asf: zero initialize the AVIOContext struct
This fixes crash in avformat_open_input() when accessing
protocol_whitelist field.

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Kacper Michajłow
d3ecb24539 libavutil/opt: Small bugfix in example.
Fix const corectness and zero init the struct. This example code would actually crash when initializing string.

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Sasi Inguva
0f6e244bb0 libx264: Increase x264 opts character limit to 4096
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 282477bf4534439ecb06f14d46446a4f1ab82284)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
054db63120 avformat/mov: Check sample size
Fixes integer overflow
Fixes: poc.mp4

Found-by: ajax secure <ajax4sec@hotmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8a3221cc67a516dfc1700bdae3566ec52c7ee823)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00