ffmpeg/fftools
Andreas Rheinhardt e822ee6ebe 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-02 10:15:07 +02:00
..
Makefile Remove the ffserver program 2018-01-06 18:31:37 +00:00
cmdutils.c fftools/cmdutils: add support for level flag in loglevel option parser 2018-04-03 10:17:38 +02:00
cmdutils.h cmdutils: print supported codecs in show_help_bsf() 2018-03-22 00:15:05 -03:00
ffmpeg.c fftools/ffmpeg: Fix integer overflow in duration computation in seek_to_start() 2020-07-01 13:33:44 +02:00
ffmpeg.h ffmpeg: remove dead call to av_parser_change() 2018-03-23 22:03:22 -03:00
ffmpeg_cuvid.c
ffmpeg_filter.c ffmpeg_filter: use nb_threads=1 on unused filtergraph 2017-11-19 04:38:29 +01:00
ffmpeg_hw.c ffmpeg: Use codec hardware config to configure hwaccels 2017-11-26 21:41:19 +00:00
ffmpeg_opt.c fftools/ffmpeg_opt: Check attachment filesize 2020-07-02 10:15:07 +02:00
ffmpeg_qsv.c
ffmpeg_videotoolbox.c
ffplay.c ffplay: Fix realloc_texture when input texture is NULL. 2018-05-01 21:21:02 +02:00
ffprobe.c ffprobe: fix SEGV when new streams are added 2018-05-18 19:16:35 -07:00