ffmpeg/fftools
Andreas Rheinhardt 754d63e9d2 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)
2020-05-20 01:49:24 +02:00
..
Makefile
cmdutils.c
cmdutils.h
ffmpeg.c fftools/ffmpeg: Fix integer overflow in duration computation in seek_to_start() 2020-05-19 17:17:35 +02:00
ffmpeg.h ffmpeg_hw: Mark some strings as const 2019-06-02 22:58:22 +01:00
ffmpeg_cuvid.c
ffmpeg_filter.c
ffmpeg_hw.c ffmpeg_hw: Treat empty device string as no device setting 2019-06-02 22:58:22 +01:00
ffmpeg_opt.c fftools/ffmpeg_opt: Check attachment filesize 2020-05-20 01:49:24 +02:00
ffmpeg_qsv.c
ffmpeg_videotoolbox.c avcodec/videotoolbox: add support for 10bit pixel format 2019-04-16 03:43:06 +03:00
ffplay.c ffplay: properly detect all window size changes 2019-08-14 22:07:32 +02:00
ffprobe.c ffprobe: Fix memory leak 2019-06-21 15:40:58 +01:00