1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
Go to file
Andreas Rheinhardt f17200f600 fftools/ffmpeg_opt: Check attachment filesize
The data of an attachment file is put into an AVCodecParameter's
extradata. The corresponding size field has type int, yet there was no
check for the size to fit into an int. As a consequence, it was possible
to create extradata with negative size (by using a big enough max_alloc).

Other errors were also possible: If SIZE_MAX < INT64_MAX (e.g. on 32bit
systems) then the file size might be truncated before the allocation;
and avio_read() takes an int, too, so one would not have read as much
as one desired.

Furthermore, the extradata is now padded as is required.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 889ad93c88)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-03 13:48:05 +02:00
compat compat/atomics: fix atomic_fetch_xor 2017-04-02 00:57:17 -03:00
doc Update for FFmpeg 3.3.9 2018-11-01 01:32:12 +01:00
libavcodec avcodec/cavsdsp: Fix undefined left shifts of negative numbers 2020-07-03 13:25:25 +02:00
libavdevice avdevice/iec61883: free the private context at the end 2018-04-18 23:02:59 -03:00
libavfilter avfilter/af_silenceremove: fix possible crash if supplied duration is negative 2019-01-25 00:58:14 +01:00
libavformat avformat/webmdashenc: Check codec types 2020-07-03 13:48:04 +02:00
libavresample Bump minor for 3.3 2017-04-02 19:49:45 +02:00
libavutil avutil/mem: Fix invalid use of av_alloc_size 2019-07-23 01:22:27 -03:00
libpostproc Bump minor for 3.3 2017-04-02 19:49:45 +02:00
libswresample swresample/swresample: Fix input channel count in resample_first computation 2018-11-01 00:52:46 +01:00
libswscale swscale: fix gbrap16 alpha channel issues 2017-09-10 01:33:28 +02:00
presets
tests avcodec/mpeg2dec: Fix field selection for skipped macroblocks 2018-04-13 00:35:15 +02:00
tools tools/fourcc2pixfmt: fix usages of av_get_codec_tag_string() 2017-03-29 14:49:29 +02:00
.gitattributes fate: add SCC test 2017-01-27 17:06:42 +01:00
.gitignore Merge commit '6641819feedb086ebba3d2be89b8d33980f367e1' 2016-06-26 15:43:05 +02:00
.travis.yml Merge commit 'eda183287489b2c705843aa373a19c4e46fb2fec' 2015-11-22 17:12:24 +00:00
arch.mak mips: rename mipsdspr1 to mipsdsp 2015-12-04 02:35:42 +01:00
Changelog Changelog: update 2018-11-18 01:33:38 +01:00
cmdutils_common_opts.h cmdutils: add show_demuxers and show_muxers 2016-11-08 01:56:31 +01:00
cmdutils_opencl.c cmdutils_opencl: fix resource_leak cid 1396852 2017-01-13 07:54:49 +08:00
cmdutils.c avformat, ffmpeg: deprecate old rotation API 2017-03-27 13:20:27 +02:00
cmdutils.h cmdutils: add show_demuxers and show_muxers 2016-11-08 01:56:31 +01:00
common.mak Merge commit '93d5b022a9fd3a1a1f9c521a1eac7f0410e05b81' 2017-03-23 17:57:35 -03:00
configure configure: bump year 2018-04-13 00:35:15 +02:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_cuvid.c ffmpeg_cuvid: adapt for recent filter graph initialization changes 2017-03-03 08:45:43 +01:00
ffmpeg_dxva2.c Merge commit '18c506e9e6e8df8b1d496d093077b8240ea68c28' 2016-06-26 15:34:01 +02:00
ffmpeg_filter.c ffmpeg: check for unconnected outputs 2017-05-07 19:52:00 +02:00
ffmpeg_opt.c fftools/ffmpeg_opt: Check attachment filesize 2020-07-03 13:48:05 +02:00
ffmpeg_qsv.c ffmpeg: init filtergraphs only after we have a frame on each input 2017-03-03 08:45:43 +01:00
ffmpeg_vaapi.c ffmpeg_vaapi: Always set hwaccel_ctx, so it gets properly cleaned up on error 2017-02-05 15:13:15 +00:00
ffmpeg_vdpau.c Merge commit 'f72db3f2f3a8c83a4f5dede8fa03434b2bf676c6' 2016-06-26 15:29:39 +02:00
ffmpeg_videotoolbox.c ffmpeg_videotoolbox: fix usage of av_get_codec_tag_string() 2017-03-29 14:49:29 +02:00
ffmpeg.c fftools/ffmpeg: Repair reinit_filter feature 2018-11-16 18:21:27 +01:00
ffmpeg.h ffmpeg: check for unconnected outputs 2017-05-07 19:52:00 +02:00
ffplay.c ffplay: change keyboard volume control to logarithmic 2017-02-08 22:36:42 +01:00
ffprobe.c ffprobe: Fix NULL pointer handling in color parameter printing 2017-09-10 01:33:28 +02:00
ffserver_config.c ffserver_config: Check for failure to allocate FFServerIPAddressACL 2016-12-22 19:23:08 +01:00
ffserver_config.h ffsrever: Make the status page bitexact if any stream is bitexact 2016-11-29 19:26:26 +01:00
ffserver.c ffserver: Fix off by 1 error in path 2017-10-26 17:34:42 +02:00
INSTALL.md
library.mak Merge commit '93d5b022a9fd3a1a1f9c521a1eac7f0410e05b81' 2017-03-23 17:57:35 -03:00
LICENSE.md Merge commit '4fef648d10bf3bcfd4b8fa5755c1128966a2427c' 2017-03-15 22:07:47 +01:00
MAINTAINERS MAINTAINERS: Add Rodger Combs to ffmpeg-security 2017-02-28 01:13:52 +01:00
Makefile Merge commit '7c9e2b295e4f70e8fedf9cceb12d95399a859a9c' 2017-03-23 20:54:20 -03:00
README.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
RELEASE Update for FFmpeg 3.3.9 2018-11-01 01:32:12 +01:00
RELEASE_NOTES add release notes based on release 3.2 2017-04-12 03:12:19 +02:00
version.sh version.sh: Fix spurious rebuilds. 2016-03-10 09:53:10 +01:00

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • ffserver is a multimedia streaming server for live broadcasts.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.