ffmpeg/fftools
Andreas Rheinhardt 889ad93c88 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>
2020-04-17 01:34:07 +02:00
..
Makefile ffmpeg: remove superfluous custom cuvid hwaccel 2020-03-03 18:11:28 -03:00
cmdutils.c cmdutils: fix crash if no name for "ffmpeg -h protocol" 2020-01-30 12:50:22 -03:00
cmdutils.h fftools: Use right function signature and pointers 2019-08-15 01:26:21 +02:00
ffmpeg.c ffmpeg: Do not clip timestamps at LONG_MAX. 2020-04-15 19:59:13 +02:00
ffmpeg.h ffmpeg: explicitly handle sub2video subpicture initialization 2020-03-16 19:35:17 +02:00
ffmpeg_filter.c ffmpeg: explicitly handle sub2video subpicture initialization 2020-03-16 19:35:17 +02:00
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-04-17 01:34:07 +02:00
ffmpeg_qsv.c
ffmpeg_videotoolbox.c avcodec/videotoolbox: add support for full range pixel formats 2019-09-04 10:51:20 -07:00
ffplay.c ffplay: flush correct stream after stats update 2020-04-04 16:01:57 +05:30
ffprobe.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00