1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
FFmpeg/libavformat
Michael Niedermayer 557617b129
avformat/avs: Check if return code is representable
Fixes: leak
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-6738814988320768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 52d666edec)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-28 20:19:03 +02:00
..
tests
.gitignore
3dostr.c avformat/3dostr: Check sample_rate 2021-09-11 21:23:49 +02:00
4xm.c avformat/4xm: Check for duplicate track ids 2022-04-13 23:39:50 +02:00
a64.c
aacdec.c avformat/aacdec: resync to the next adts frame on invalid data instead of aborting 2019-07-23 01:13:41 -03:00
aadec.c avformat/aadec: Check toc_size to contain the minimum to demuxer uses 2020-07-02 19:55:09 +02:00
ac3dec.c
acm.c
act.c avformat/act: Check ff_get_wav_header() for failure 2022-06-14 17:06:21 +02:00
adp.c
ads.c avformat/ads: Check size 2021-09-11 21:23:48 +02:00
adtsenc.c avformat/adtsenc: return value check for init_get_bits in adts_decode_extradata 2021-09-12 11:22:04 +02:00
adxdec.c
aea.c
afc.c
aiff.h
aiffdec.c avformat/aiffdec: Use 64bit for block_duration use 2022-09-24 22:47:53 +02:00
aiffenc.c
aixdec.c
allformats.c
amr.c libavformat/amr.c: Check return value from avio_read() 2020-07-02 19:55:09 +02:00
anm.c
apc.c
ape.c avformat/ape: Check frames size 2022-09-24 22:49:30 +02:00
apetag.c
apetag.h
apngdec.c
apngenc.c
aqtitledec.c avformat/aqtitledec: Skip unrepresentable durations 2022-04-13 23:39:50 +02:00
asf.c
asf.h
asfcrypt.c
asfcrypt.h
asfdec_f.c avformat/asfdec_f: Use 64bit for packet start time 2022-07-22 17:12:28 +02:00
asfdec_o.c avformat/asfdec_o: Limit packet offset 2022-09-24 22:51:07 +02:00
asfenc.c
assdec.c avformat/assdec: Fix memleak upon read header failure 2020-07-03 00:02:12 +02:00
assenc.c
ast.c
ast.h
astdec.c
astenc.c
async.c
au.c avformat/au: cleanup on EOF return in au_read_annotation() 2021-09-11 21:23:48 +02:00
audiointerleave.c
audiointerleave.h
avc.c
avc.h
avformat.h
avformatres.rc
avi.h
avidec.c avformat/avidec: Prevent entity expansion attacks 2022-08-28 22:49:02 +02:00
avienc.c libavformat/avienc: Check bits per sample for PAL8 2020-07-02 19:55:09 +02:00
avio_internal.h
avio.c avformat/avio: Check av_opt_copy() for failure 2021-09-11 21:23:49 +02:00
avio.h
aviobuf.c avformat/aviobuf: Don't check for overflow after it happened 2020-07-02 23:56:13 +02:00
avisynth.c
avlanguage.c
avlanguage.h
avr.c avformat/avr: Check sample rate 2023-10-18 18:23:49 +02:00
avs.c avformat/avs: Check if return code is representable 2023-10-28 20:19:03 +02:00
bethsoftvid.c avformat/bethsoftvid: Check image dimensions before use 2021-09-11 21:23:48 +02:00
bfi.c avformat/bfi: Check offsets better 2022-06-14 17:12:20 +02:00
bink.c
bintext.c avformat/bintext: Check width 2021-09-11 21:23:48 +02:00
bit.c
bluray.c
bmv.c
boadec.c avformat/boadec: Check that channels and block_align are set 2021-09-11 21:23:48 +02:00
brstm.c
c93.c
cache.c
caf.c
caf.h
cafdec.c avformat/cafdec: Check that nb_frasmes fits within 64bit 2022-09-24 22:51:39 +02:00
cafenc.c
cavsvideodec.c
cdg.c avformat/cdg: Fix integer overflow in duration computation 2021-09-11 21:23:48 +02:00
cdxl.c avformat/cdxl: Fix integer overflow in intermediate 2019-11-15 12:25:46 +01:00
chromaprint.c
cinedec.c avformat/cinedec: Fix index_entries size check 2021-09-11 21:23:49 +02:00
concat.c
concatdec.c avformat/concatdec: use av_strstart() 2021-09-11 21:23:48 +02:00
crcenc.c
crypto.c
cutils.c
dash.c
dash.h
dashdec.c
dashenc.c
data_uri.c
dauddec.c
daudenc.c
dcstr.c avformat/dcstr: Check sample rate 2021-09-11 21:23:49 +02:00
dfa.c
diracdec.c
dnxhddec.c
dsfdec.c avformat/dsfdec: Check block_align more completely 2021-09-11 21:23:48 +02:00
dsicin.c avformat/dsicin: Check packet size for overflow 2021-09-12 11:22:04 +02:00
dss.c
dtsdec.c
dtshddec.c
dump.c
dv.c
dv.h
dvbsub.c
dvbtxt.c
dvenc.c
dxa.c avformat/dxa: avoid bpc overflows 2022-09-24 22:52:54 +02:00
eacdata.c
electronicarts.c avformat/electronicarts: Clear partial_packet on error 2021-09-11 21:23:49 +02:00
epafdec.c
ffm.h
ffmdec.c
ffmenc.c
ffmeta.h
ffmetadec.c
ffmetaenc.c
fifo.c
file_open.c
file.c
filmstripdec.c
filmstripenc.c
fitsdec.c avformat/fitsdec: Better size checks 2021-09-11 21:23:48 +02:00
fitsenc.c
flac_picture.c
flac_picture.h
flacdec.c
flacenc_header.c
flacenc.c
flacenc.h
flic.c
flv.h
flvdec.c avformat/flvdec: Check for EOF in index reading 2022-07-22 17:15:53 +02:00
flvenc.c avformat/flvenc: Check audio packet size 2018-10-28 02:22:42 +02:00
format.c avformat/format: Stop reading data at EOF during probing 2023-10-18 18:44:08 +02:00
framecrcenc.c
framehash.c
frmdec.c
fsb.c
ftp.c avformat/ftp: Check for av_strtok() failure 2021-09-11 21:23:49 +02:00
g722.c
g723_1.c
g726.c
g729dec.c
gdv.c avformat/gdv: Check fps 2019-03-24 10:38:52 +01:00
genh.c avformat/genh: Check sample rate 2022-06-14 16:53:24 +02:00
gif.c
gifdec.c
golomb_tab.c
gopher.c
gsmdec.c
gxf.c avformat/gxf: Check pkt_len 2021-09-11 21:23:48 +02:00
gxf.h
gxfenc.c
h261dec.c
h263dec.c
h264dec.c
hashenc.c
hdsenc.c
hevc.c avformat/hevc: Fix potential leak in case of ff_hevc_annexb2mp4_buf failure 2020-07-02 23:44:51 +02:00
hevc.h avformat/hevc: Fix potential leak in case of ff_hevc_annexb2mp4_buf failure 2020-07-02 23:44:51 +02:00
hevcdec.c
hls.c libavformat/hls: Free keys 2022-09-24 22:39:01 +02:00
hlsenc.c
hlsproto.c
hnm.c avformat/hnm: Check for extradata allocation failure 2020-07-02 23:56:12 +02:00
http.c avformat/http: Fix Out-of-Bounds access in process_line() 2019-03-24 10:38:51 +01:00
http.h
httpauth.c
httpauth.h
icecast.c
icodec.c avformat/icodec: Check nb_pal 2022-09-24 22:48:19 +02:00
icoenc.c
id3v1.c
id3v1.h
id3v2.c avformat/id3v2: Check taglen in read_uslt() 2023-06-04 20:18:12 +02:00
id3v2.h
id3v2enc.c
idcin.c
idroqdec.c
idroqenc.c
iff.c libavformat/iff: Check for overflow in body_end calculation 2022-08-28 22:49:42 +02:00
ilbc.c
img2_alias_pix.c
img2_brender_pix.c
img2.c
img2.h
img2dec.c
img2enc.c
ingenientdec.c
internal.h
ipmovie.c
ircam.c
ircam.h
ircamdec.c
ircamenc.c
isom.c
isom.h avformat/mov.c: require tfhd to begin parsing trun 2019-03-24 10:38:51 +01:00
iss.c
iv8.c
ivfdec.c
ivfenc.c
jacosubdec.c avformat/jacosubdec: Check for min in t overflow in get_shift() 2021-10-09 18:34:49 +02:00
jacosubenc.c
jvdec.c
latmenc.c avformat/latmenc: abort if no extradata is available 2022-04-13 23:39:49 +02:00
libavformat.v
libgme.c
libmodplug.c
libopenmpt.c
librtmp.c
libsmbclient.c
libssh.c
lmlm4.c
loasdec.c
log2_tab.c
lrc.c
lrc.h
lrcdec.c avformat/lrcdec: Clip timestamps 2021-09-11 21:23:48 +02:00
lrcenc.c
lvfdec.c avformat/lvfdec: Check stream_index before use 2021-09-11 21:23:48 +02:00
lxfdec.c avformat/lxfdec: Fix multiple integer overflows related to track_size 2021-09-11 21:23:49 +02:00
m4vdec.c
Makefile
matroska.c
matroska.h
matroskadec.c avformat/matroskadec: Check pre_ns 2022-04-13 23:39:50 +02:00
matroskaenc.c avformat/matroskaenc: Don't use NULL for %s format string 2020-07-03 00:02:14 +02:00
md5proto.c
metadata.c
metadata.h
mgsts.c
microdvddec.c avformat/microdvddec: use 64bit for durations 2021-09-11 21:23:49 +02:00
microdvdenc.c
mj2kdec.c
mkvtimestamp_v2.c
mlpdec.c
mlvdec.c avformat/mlvdec: fail reading a packet with 0 streams 2020-07-02 19:55:09 +02:00
mm.c avformat/mm: Check for existence of audio stream 2021-09-11 21:23:48 +02:00
mmf.c
mms.c
mms.h
mmsh.c
mmst.c
mov_chan.c
mov_chan.h
mov.c avformat/mov: Check samplesize and offset to avoid integer overflow 2023-06-04 20:18:15 +02:00
movenc.c aformat/movenc: add missing padding to output track extradata 2022-05-04 18:20:56 +02:00
movenc.h
movenccenc.c
movenccenc.h
movenchint.c
mp3dec.c avformat/mp3dec: Check that the frame fits within the probe buffer 2019-11-21 23:27:24 +01:00
mp3enc.c avformat/mp3enc: Avoid SEEK_END as it is unsupported 2019-11-14 23:30:37 +01:00
mpc8.c avformat/mpc8: Check for position overflow in mpc8_handle_chunk() 2021-09-11 21:23:49 +02:00
mpc.c avformat/mpc: deallocate frames array on errors 2019-11-15 12:25:45 +01:00
mpeg.c avformat/mpeg: Check avio_read() return value in get_pts() 2021-09-11 21:23:48 +02:00
mpeg.h
mpegenc.c avformat/mpegenc: Fix integer overflow with AV_NOPTS_VALUE 2020-07-02 19:55:09 +02:00
mpegts.c avformat/mpegts: use actually read packet size in mpegts_resync special case 2021-10-09 18:34:49 +02:00
mpegts.h
mpegtsenc.c
mpegvideodec.c
mpjpeg.c
mpjpegdec.c
mpl2dec.c avformat/mpl2dec: Fix memleak upon read header failure 2020-07-03 00:02:13 +02:00
mpsubdec.c avformat/mpsubdec: Fix memleak upon read header failure 2020-07-03 00:02:13 +02:00
msf.c avformat/msf: Check that channels doesnt overflow during extradata construction 2021-09-11 21:23:49 +02:00
msnwc_tcp.c
mtaf.c
mtv.c
musx.c
mux.c
mvdec.c avformat/mvdec: Do not set invalid sample rate 2021-10-09 18:34:49 +02:00
mvi.c avformat/mvi: Check audio size for more overflows 2021-09-11 21:23:49 +02:00
mxf.c
mxf.h
mxfdec.c avformat/mxfdec: Check for duplicate mxf_read_index_entry_array() 2022-04-13 23:39:50 +02:00
mxfenc.c
mxg.c
ncdec.c
network.c
network.h network: Define ENOTCONN as WSAENOTCONN if not defined 2021-09-12 11:22:04 +02:00
nistspheredec.c avformat/nistspheredec: Check bits_per_coded_sample and channels 2021-09-11 21:23:48 +02:00
nsvdec.c avformat/nsvdec: Fix memleaks on errors while reading the header 2020-07-02 19:55:09 +02:00
nullenc.c
nut.c
nut.h
nutdec.c avformat/nutdec: Check fields 2022-09-24 22:54:05 +02:00
nutenc.c avformat/nutenc: don't allocate a dynamic AVIOContext if no index is going to be written 2022-05-04 19:38:37 +02:00
nuv.c avformat/nuv: Check channels 2021-09-11 21:23:48 +02:00
oggdec.c avformat/oggdec: Check for EOF after page header 2020-07-02 19:55:09 +02:00
oggdec.h
oggenc.c
oggparsecelt.c
oggparsedaala.c
oggparsedirac.c
oggparseflac.c
oggparseogm.c
oggparseopus.c
oggparseskeleton.c
oggparsespeex.c
oggparsetheora.c
oggparsevorbis.c avformat/oggparsevorbis: Error out on double init of vp 2020-07-02 19:55:09 +02:00
oggparsevp8.c
oma.c
oma.h
omadec.c avformat/omadec: Fix memleaks upon read_header failure 2020-07-02 23:58:21 +02:00
omaenc.c
options_table.h
options.c
os_support.c
os_support.h
paf.c avformat/paf: Check for EOF before allocation in read_header() 2021-09-11 21:23:49 +02:00
pcm.c
pcm.h
pcmdec.c
pcmenc.c
pjsdec.c avformat/pjsdec: Fix memleak upon read header failure 2020-07-03 00:02:13 +02:00
pmpdec.c
prompeg.c
protocols.c
psxstr.c
pva.c
pvfdec.c
qcp.c avformat/qcp: Avoid negative nb_rates 2021-09-11 21:23:49 +02:00
qtpalette.c
qtpalette.h
r3d.c avformat/r3d: Check samples before computing duration 2021-09-11 21:23:49 +02:00
rawdec.c
rawdec.h
rawenc.c lavf/rawenc: Only accept the appropriate stream type for raw muxers. 2019-09-06 19:01:27 -03:00
rawenc.h
rawutils.c
rawvideodec.c
rdt.c
rdt.h
realtextdec.c avformat/realtextdec: Check the pts difference before using it for the duration computation 2021-09-11 21:23:49 +02:00
redspark.c
replaygain.c avformat/replaygain: avoid undefined / negative abs 2023-06-04 20:18:10 +02:00
replaygain.h
riff.c
riff.h
riffdec.c
riffenc.c
rl2.c
rm.c
rm.h
rmdec.c avformat/rmdec: check tag_size 2022-09-24 22:54:46 +02:00
rmenc.c
rmsipr.c
rmsipr.h
rpl.c avformat/rpl: The associative law doesnt hold for signed integers in C 2021-09-11 21:23:49 +02:00
rsd.c uavformat/rsd: check for EOF in extradata 2021-09-11 21:23:48 +02:00
rso.c
rso.h
rsodec.c
rsoenc.c
rtmp.h
rtmpcrypt.c
rtmpcrypt.h
rtmpdh.c
rtmpdh.h
rtmphttp.c
rtmppkt.c
rtmppkt.h
rtmpproto.c
rtp.c
rtp.h
rtpdec_ac3.c
rtpdec_amr.c
rtpdec_asf.c
rtpdec_dv.c
rtpdec_formats.h
rtpdec_g726.c
rtpdec_h261.c
rtpdec_h263_rfc2190.c
rtpdec_h263.c
rtpdec_h264.c
rtpdec_hevc.c
rtpdec_ilbc.c
rtpdec_jpeg.c
rtpdec_latm.c
rtpdec_mpa_robust.c
rtpdec_mpeg4.c
rtpdec_mpeg12.c
rtpdec_mpegts.c
rtpdec_qcelp.c
rtpdec_qdm2.c
rtpdec_qt.c
rtpdec_rfc4175.c
rtpdec_svq3.c
rtpdec_vc2hq.c
rtpdec_vp8.c
rtpdec_vp9.c
rtpdec_xiph.c
rtpdec.c
rtpdec.h
rtpenc_aac.c
rtpenc_amr.c
rtpenc_chain.c
rtpenc_chain.h
rtpenc_h261.c
rtpenc_h263_rfc2190.c
rtpenc_h263.c
rtpenc_h264_hevc.c
rtpenc_jpeg.c
rtpenc_latm.c
rtpenc_mpegts.c
rtpenc_mpv.c
rtpenc_vc2hq.c
rtpenc_vp8.c
rtpenc_vp9.c
rtpenc_xiph.c
rtpenc.c
rtpenc.h
rtpproto.c
rtpproto.h
rtsp.c avformat/rtsp: break on unknown protocols 2022-07-12 22:46:58 +02:00
rtsp.h
rtspcodes.h
rtspdec.c
rtspenc.c
s337m.c
samidec.c avformat/samidec: Sanity check pts 2021-09-11 21:23:49 +02:00
sapdec.c
sapenc.c
sauce.c
sauce.h
sbgdec.c avformat/sbgdec: Check for period overflow 2023-10-19 12:10:18 +02:00
sccdec.c avformat/sccdec: Fix memleak upon read header failure 2020-07-03 00:02:13 +02:00
sccenc.c
sctp.c avformat/sctp: close socket on errors 2022-07-12 22:27:50 +02:00
sdp.c
sdr2.c
sdsdec.c avformat/sdsdec: Use av_rescale() to avoid intermediate overflow in duration calculation 2022-09-24 22:56:03 +02:00
sdxdec.c
segafilm.c avformat/segafilm: Do not assume AV_CODEC_ID_NONE is 0 2021-09-11 21:23:48 +02:00
segment.c
shortendec.c avformat/shortendec: Check k in probe 2019-11-15 12:25:46 +01:00
sierravmd.c
siff.c avformat/siff: Reject audio packets without audio stream 2021-09-11 21:23:48 +02:00
smacker.c
smjpeg.c
smjpeg.h
smjpegdec.c avformat/smjpegdec: Check the existence of referred streams 2021-09-11 21:23:48 +02:00
smjpegenc.c
smoothstreamingenc.c avformat/smoothstreaming: Fix memleaks on errors 2020-07-02 23:56:12 +02:00
smush.c
sol.c
sox.h
soxdec.c avformat/soxdec: Check channels to be positive 2021-09-11 21:23:49 +02:00
soxenc.c
spdif.c
spdif.h
spdifdec.c avformat/spdifdec: Use 64bit to compute bit rate 2022-09-24 22:56:59 +02:00
spdifenc.c
srtdec.c avformat/srtdec: Fix memleak upon read header failure 2020-07-03 00:02:13 +02:00
srtenc.c
srtp.c
srtp.h
srtpproto.c
stldec.c avformat/stldec: Fix memleak upon read header failure 2020-07-03 00:02:14 +02:00
subfile.c
subtitles.c avformat/subtitles: Don't increment packet counter prematurely 2020-07-02 23:56:12 +02:00
subtitles.h
subviewer1dec.c avformat/subviewer1dec: Fix memleak upon read header failure 2020-07-03 00:02:14 +02:00
subviewerdec.c avformat/subviewerdec: fail on AV_NOPTS_VALUE 2021-09-11 21:23:48 +02:00
supdec.c
supenc.c
svag.c
swf.c
swf.h
swfdec.c
swfenc.c avformat/swfenc: Fix integer overflow in frame rate handling 2020-07-02 19:55:09 +02:00
takdec.c
tcp.c
tedcaptionsdec.c avformat/tedcaptionsdec: Check for overflow in parse_int() 2021-09-11 21:23:48 +02:00
tee_common.c
tee_common.h
tee.c
teeproto.c
thp.c avformat/thp: Check fps 2020-07-02 19:55:10 +02:00
tiertexseq.c
tls_gnutls.c
tls_openssl.c
tls_schannel.c avformat/tls_schannel: immediately return decrypted data if available 2020-09-04 20:46:29 +03:00
tls_securetransport.c
tls.c
tls.h
tmv.c
tta.c avformat/tta: Check for EOF in index reading loop 2021-09-11 21:23:49 +02:00
ttaenc.c
tty.c avformat/tty: add probe function 2022-04-13 23:39:49 +02:00
txd.c
udp.c
uncodedframecrcenc.c
unix.c
url.c
url.h
urldecode.c
urldecode.h
utils.c avformat/utils: Fix invalid NULL pointer operation in ff_parse_key_value() 2022-04-13 23:39:50 +02:00
v210.c
vag.c
vc1dec.c
vc1test.c
vc1testenc.c
version.h
vivo.c
voc_packet.c avformat/voc_packet: prevent remaining size from becoming negative in ff_voc_get_packet() 2021-09-11 21:23:49 +02:00
voc.c
voc.h
vocdec.c
vocenc.c
vorbiscomment.c
vorbiscomment.h
vpcc.c
vpcc.h
vpk.c avformat/vpk: Check offset for validity 2019-11-14 23:30:37 +01:00
vplayerdec.c avformat/vplayerdec: Fix memleak upon read header failure 2020-07-03 00:02:14 +02:00
vqf.c avformat/vqf: Check len for COMM chunks 2021-09-11 21:23:48 +02:00
w64.c
w64.h
wavdec.c avformat/wavdec: Check that smv block fits in available space 2023-06-04 20:24:43 +02:00
wavenc.c
wc3movie.c
webm_chunk.c lavf/webm_chunk: Fix NULL dereference 2020-07-03 00:03:45 +02:00
webmdashenc.c avformat/webmdashenc: Check codec types 2020-07-02 23:56:13 +02:00
webpenc.c
webvttdec.c avformat/webvttdec: Fix memleak upon read header failure 2020-07-03 00:02:14 +02:00
webvttenc.c
westwood_aud.c
westwood_vqa.c avformat/westwood_vqa: Check chunk size 2023-10-19 12:15:03 +02:00
wsddec.c avformat/wsddec: Fix undefined shift 2019-11-14 23:30:37 +01:00
wtv_common.c
wtv.h
wtvdec.c avformat/wtvdec: Check for EOF before seeking back in parse_media_type() 2021-09-12 11:22:04 +02:00
wtvenc.c
wv.c
wv.h
wvdec.c avformat/wvdec: detect and error out on WavPack DSD files 2019-03-24 10:38:51 +01:00
wvedec.c
wvenc.c
xa.c
xmv.c avformat/xmv: Make bitrate 64bit 2019-11-14 23:30:37 +01:00
xvag.c
xwma.c avformat/xwma: Use av_rescale() for duration computation 2022-09-24 22:56:22 +02:00
yop.c
yuv4mpeg.h
yuv4mpegdec.c
yuv4mpegenc.c