Michael Niedermayer
dc2d3856f3
avcodec/utils: correct align value for interplay
...
Fixes out of array access
Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2080bc3371
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:13 +01:00
Michael Niedermayer
dd36b3a06a
avcodec/vp56: Check for the bitstream end, pass error codes on
...
Fixes timeout
Fixes: 446/fuzz-3-ffmpeg_VIDEO_AV_CODEC_ID_VP6_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9e6a242755
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:13 +01:00
Michael Niedermayer
14f555683a
avcodec/mjpegdec: Check remaining bitstream in ljpeg_decode_yuv_scan()
...
Fixes timeout
Fixes: 445/fuzz-3-ffmpeg_VIDEO_AV_CODEC_ID_MJPEG_fuzzer
Fixes: 456/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_JPEGLS_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 755933cb5c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:13 +01:00
Michael Niedermayer
bd6c1d5149
avcodec/pngdec: Fix off by 1 size in decode_zbuf()
...
Fixes out of array access
Fixes: 444/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_PNG_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e371f031b9
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Andreas Cadhalpun
41fc098a86
libopenmpt: add missing avio_read return value check
...
This fixes heap-buffer-overflows in libopenmpt caused by interpreting
the negative size value as unsigned size_t.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
Reviewed-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 367cac7827
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Michael Niedermayer
3442c20c4d
avcodec/bsf: Fix av_bsf_list_free()
...
Negate null check
Fixes CID1396248
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 762bf6f4af
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Michael Niedermayer
7d222736c2
avcodec/omx: Do not pass negative value into av_malloc()
...
Fixes CID1396849
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit bd83c295fc
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Tobias Rapp
d5154c055b
avformat/avidec: skip odml master index chunks in avi_sync
...
Fixes pts gaps when reading AVI files > 256GiB generated by FFmpeg.
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6d579d7c1b
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Michael Niedermayer
cd81993070
avcodec/mjpegdec: Check for rgb before flipping
...
Fixes assertion failure due to unsupported case
Fixes: 356/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_MJPEG_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 25d9643f11
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Matt Wolenetz
2481f1320a
lavf/utils.c Protect against accessing entries[nb_entries]
...
In ff_index_search_timestamp(), if b == num_entries,
m == num_entries - 1, and entries[m].flags & AVINDEX_DISCARD_FRAME is
true, then the search for the next non-discarded packet could access
entries[nb_entries], exceeding its bounds. This change adds a protection
against that scenario. Reference: https://crbug.com/666770
Reviewed-by: Sasi Inguva <isasi@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit fe7547d69e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Michael Niedermayer
ceeeccc862
avutil/random_seed: Reduce the time needed on systems with very low precission clock()
...
This should fix issues on BSD
CLOCKS_PER_SEC is 128 on BSD while SUSv2 requires it to be a million
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c4152fc42e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Michael Niedermayer
07df85b958
swscale/swscale: Fix dereference of stride array before null check
...
Fixes: CID1396263
Fixes: CID1396271
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 03ce71e4a1
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Michael Niedermayer
7643e8584f
avutil/random_seed: Improve get_generic_seed() with higher precission clock()
...
Tested-by: Thomas Turner <thomastdt@googlemail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit da73d95bad
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Chris Cunningham
533431d5af
avformat/mp3dec: fix msan warning when verifying mpa header
...
MPEG Audio frame header must be 4 bytes. If we fail to read
4 bytes bail early to avoid Use-of-uninitialized-value msan error.
Reference https://crbug.com/666874 .
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ab87df9a47
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Michael Niedermayer
9519b2560e
avformat/utils: Print verbose error message if stream count exceeds max_streams
...
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f0bdd53871
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Michael Niedermayer
3e3e095fc9
avformat/options_table: Set the default maximum number of streams to 1000
...
Fixes CVE-2016-9561, Note the security relevance of this is disputed as
running out of memory can happen with valid files
Suggested-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com >
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 30581c51e7
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-26 00:34:12 +01:00
Georgi D. Sotirov
41f8a8843d
lavf/chromaprint: Update for version 1.4
...
Fixes ticket #5997 .
(cherry picked from commit 581f93f37e
)
Fixes Debian bug 841501.
2017-01-15 11:53:41 +01:00
Michael Niedermayer
64bb329afa
avutil: Add av_image_check_size2()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f542b152aa
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-11 00:21:53 +01:00
Michael Niedermayer
3ecbac5664
avformat: Add max_streams option
...
This allows user apps to stop OOM due to excessive number of streams
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1296f84495
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-11 00:21:53 +01:00
Michael Niedermayer
0e6febff5a
avcodec/ffv1enc: Allocate smaller packet if the worst case size cannot be allocated
...
We are checking during encoding if there is enough space as version 4 needs that
check.
Fixes Ticket6005
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 38a7834bbb
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-11 00:21:53 +01:00
Michael Niedermayer
3f779aef79
avcodec/mpeg4videodec: Fix undefined shifts in mpeg4_decode_sprite_trajectory()
...
Fixes: part of 670190.ogg
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8258e36385
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-11 00:21:53 +01:00
Michael Niedermayer
35ef033a19
avformat/oggdec: Skip streams in duration correction that did not had their duration set.
...
Fixes: part of 670190.ogg
Fixes integer overflow
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ee2a6f5df8
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-11 00:21:53 +01:00
Michael Niedermayer
aec21cd840
avcodec/ffv1enc: Fix size of first slice
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit cff1c0edaa
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-11 00:21:53 +01:00
Marton Balint
47e47cfb07
ffplay: fix sws_scale possible out of bounds array access
...
As I used simple RGBA formats for subtitles and for the video texture if
avfilter is disabled I kind of assumed that sws_scale won't access data
pointers and strides above index 0, but apparently that is not the case.
Fixes Coverity CID 1396737, 1396738, 1396739, 1396740.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Marton Balint <cus@passwd.hu >
2016-12-10 23:24:05 +01:00
Srinath K R
314c425b16
avfilter/vf_hwupload_cuda: Add min/max limits for the 'device' option
...
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2016-12-08 11:26:34 +01:00
Michael Niedermayer
148c4fb8d2
Update for 3.2.2
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
n3.2.2
2016-12-06 00:09:40 +01:00
Michael Niedermayer
c12ee64e80
ffserver: Check chunk size
...
Fixes out of array access
Fixes: poc_ffserver.py
Found-by: Paul Cher <paulcher@icloud.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a5d25faa3f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
46cd1699f9
Avoid using the term "file" and prefer "url" in some docs and comments
...
This should make it less ambigous that these are URLs
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a5f27a9c3a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
32b95471a8
avformat/rtmppkt: Check for packet size mismatches
...
Fixes out of array access
Found-by: Paul Cher <paulcher@icloud.com >
Reviewed-by: Paul Cher <paulcher@icloud.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7d57ca4d9a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Timothy Gu
f66bfe71bb
zmqsend: Initialize ret to 0
...
Fixes CID1396857.
(cherry picked from commit d903b4e3ad
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
af1e19b9e4
avcodec/flacdec: Fix undefined shift in decode_subframe()
...
Fixes undefined behavior
Fixes: 639961-media
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1f5630af51
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
334901aea0
avcodec/get_bits: Fix get_sbits_long(0)
...
Fixes undefined behavior
Fixes: 640889-media
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c72fa43234
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
bbe9a4b542
avformat/ffmdec: Check media type for chunks
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e706e2e775
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
a772aaf5dc
avcodec/flacdec: Fix signed integer overflow in decode_subframe_fixed()
...
Fixes undefined behavior
Fixes: 640912-media
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 83a75bf6c3
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
c39e8d05f5
avcodec/flacdsp_template: Fix undefined shift in flac_decorrelate_indep_c
...
Fixes: left shift of negative value
Fixes: 668346-media
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit acc163c6ab
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
a0715c1e89
avformat/oggparsespeex: Check frames_per_packet and packet_size
...
The speex specification does not seem to restrict these values, thus
the limits where choosen so as to avoid multiplicative overflow
Fixes undefined behavior
Fixes: 635422.ogg
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit afcf15b0db
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
a0ed412f38
avformat/utils: Check start/end before computing duration in update_stream_timings()
...
Fixes undefined behavior
Fixes: 637428.ogg
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 90da187f1d
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
2fb7eb05dc
avcodec/flac_parser: Update nb_headers_buffered
...
Fixes infinite loop
Fixes: fuzz.flac
Found-by: Frank Liberato <liberato@google.com >
Reviewed-by: Frank Liberato <liberato@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2475858889
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
8e4f737d2f
avformat/idroqdec: Check chunk_size for being too large
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 744a0b5206
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
2d51cb1d0a
avcodec/me_cmp: Fix median_sad size
...
Fixes out of array read
Fixes: COV1396255
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d9883ded34
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
Michael Niedermayer
c165bad0c0
avformat/utils: Fix type mismatch
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a06e84b56e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 00:07:50 +01:00
James Almer
16aa8c8146
configure: check for strtoull on msvc
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit b52d3574d4
)
2016-12-05 19:20:59 -03:00
Ronald S. Bultje
e5be73e178
http: move chunk handling from http_read_stream() to http_buf_read().
...
(cherry picked from commit 845bb40178
)
2016-12-05 16:20:12 -05:00
Ronald S. Bultje
0e0a413725
http: make length/offset-related variables unsigned.
...
Fixes #5992 , reported and found by Paul Cher <paulcher@icloud.com >.
(cherry picked from commit 2a05c8f813
)
2016-12-05 16:20:12 -05:00
James Almer
c269c43a83
avcodec/aac_adtstoasc_bsf: validate and forward extradata if the stream is already ASC
...
Fixes ticket #5973
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 6e1902bab4
)
n3.2.1
2016-11-25 18:51:00 -03:00
Andreas Cadhalpun
6f3e3cb8ba
Update Changelog
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-25 22:23:39 +01:00
Andreas Cadhalpun
d147114b9d
mss2: only use error correction for matching block counts
...
This fixes a heap-buffer-overflow in ff_er_frame_end when decoding mss2
with coded_width/coded_height larger than width/height.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
(cherry picked from commit 2566ad98b0
)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-25 22:22:19 +01:00
Andreas Cadhalpun
ad82036626
softfloat: decrease MIN_EXP to cover full float range
...
floats are not necessarily normalized, so a normalized softfloat needs
MIN_EXP lowered by 23 to cover that range.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
(cherry picked from commit 2d6f46d801
)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-25 22:22:15 +01:00
Andreas Cadhalpun
a6a2d9d1e5
libopusdec: default to stereo for invalid number of channels
...
This fixes an out-of-bounds read if avc->channels is 0.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
(cherry picked from commit 8c8f543b81
)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-25 22:22:11 +01:00
Andreas Cadhalpun
6ad2773142
flvdec: require need_context_update when changing codec id
...
Otherwise the codec context and codecpar might disagree on the codec id,
triggering asserts in av_parser_parse2.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
(cherry picked from commit 98b3a7979f
)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-25 22:22:07 +01:00