Go to file
Andreas Rheinhardt eb89291877 avcodec/ttaenc: Fix undefined shift
ttaenc contained (1 << unary) - 1 as an argument for a function
expecting an unsigned int. unary can be as big as 31 in this case.
The type of the shift and the whole expression is int, because 1 fits
into an integer, so that the behaviour is undefined if unary == 31
as the result of the shift can't be represented in an int §. Subtraction
by 1 (which makes the result of the whole expression representable in
an int) doesn't change that this is undefined (it usually leads to
signed integer overflow which is undefined, too).

The solution is simple: Make 1 unsigned to change the type of the
whole expression to unsigned int (as the function expects anyway).

Fixes ticket #8153.

§: This of course presupposes the common int range of -2^31..2^31-1

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3ab488a540)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-03 14:13:50 +02:00
compat
doc Update for FFmpeg 3.3.9 2018-11-01 01:32:12 +01:00
libavcodec avcodec/ttaenc: Fix undefined shift 2020-07-03 14:13:50 +02:00
libavdevice avdevice/iec61883: free the private context at the end 2018-04-18 23:02:59 -03:00
libavfilter avfilter/vf_xbr: Fix left shift of negative number 2020-07-03 14:13:50 +02:00
libavformat avformat/movenc: Fix undefined shift 2020-07-03 14:13:49 +02:00
libavresample
libavutil avutil/mem: Fix invalid use of av_alloc_size 2019-07-23 01:22:27 -03:00
libpostproc
libswresample swresample/swresample: Fix input channel count in resample_first computation 2018-11-01 00:52:46 +01:00
libswscale swscale/utils: Fix invalid left shifts of negative numbers 2020-07-03 14:13:49 +02:00
presets
tests avcodec/mpeg2dec: Fix field selection for skipped macroblocks 2018-04-13 00:35:15 +02:00
tools
.gitattributes
.gitignore
.travis.yml
arch.mak
Changelog Changelog: update 2018-11-18 01:33:38 +01:00
cmdutils_common_opts.h
cmdutils_opencl.c
cmdutils.c
cmdutils.h
common.mak
configure
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_cuvid.c
ffmpeg_dxva2.c
ffmpeg_filter.c
ffmpeg_opt.c fftools/ffmpeg_opt: Fix signed integer overflow 2020-07-03 14:13:48 +02:00
ffmpeg_qsv.c
ffmpeg_vaapi.c
ffmpeg_vdpau.c
ffmpeg_videotoolbox.c
ffmpeg.c fftools/ffmpeg: Free swresample dictionary during cleanup 2020-07-03 14:13:50 +02:00
ffmpeg.h
ffplay.c
ffprobe.c
ffserver_config.c
ffserver_config.h
ffserver.c
INSTALL.md
library.mak
LICENSE.md
MAINTAINERS
Makefile
README.md
RELEASE Update for FFmpeg 3.3.9 2018-11-01 01:32:12 +01:00
RELEASE_NOTES
version.sh

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.