1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00
FFmpeg/libavformat
Michael Niedermayer 1ec4553e35
avformat/jpegxl_probe: check length instead of blindly reading
Enable the checked bitreader to avoid overread.
Also add a few checks in loops and between blocks so we exit instead of continued
execution.
Alternatively we could add manual checks so that no overread can happen. This would be
slightly faster but a bit more work and a bit more fragile

Fixes: Out of array accesses
Fixes: 59640/clusterfuzz-testcase-minimized-ffmpeg_dem_JPEGXL_ANIM_fuzzer-6584117345779712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-06-11 21:11:21 -04:00
..
tests avformat/imf: clean-up logging 2023-05-31 09:03:58 -07:00
.gitignore
3dostr.c
4xm.c
a64.c
aacdec.c
aadec.c
aaxdec.c
ac3_channel_layout_tab.c
ac3dec.c
acedec.c
acm.c
act.c
adp.c
ads.c
adtsenc.c avformat/adtsenc: do not pass NULL to av_log() 2023-04-27 21:38:21 +02:00
adxdec.c
aea.c
afc.c
aiff.c
aiff.h
aiffdec.c
aiffenc.c
aixdec.c
allformats.c avformat/jpegxl_anim_dec: add animated JPEG XL demuxer 2023-06-05 12:15:05 -04:00
alp.c
amr.c
amvenc.c
anm.c lavf: return AVERROR_EOF rather than EIO on EOF 2023-03-27 17:14:31 +02:00
apac.c
apc.c
ape.c
apetag.c
apetag.h
apm.c
apngdec.c
apngenc.c
aptxdec.c
aqtitledec.c
argo_asf.c
argo_asf.h
argo_brp.c
argo_cvg.c
asf_tags.c
asf.c
asf.h
asfcrypt.c
asfcrypt.h
asfdec_f.c
asfdec_o.c
asfenc.c
assdec.c
assenc.c avformat/assenc: avoid incorrect copy of null terminator 2023-04-02 21:31:05 +02:00
ast.c
ast.h
astdec.c
astenc.c
async.c
au.c
av1.c
av1.h
av1dec.c avformat/av1: reduce the scope of a variable 2023-06-06 09:26:19 -03:00
avc.c
avc.h
avformat.c lavc: deprecate AVCodecContext.ticks_per_frame 2023-05-15 10:56:18 +02:00
avformat.h
avformatres.rc
avi.h
avidec.c lavf/dv: do not set video timebase more than once 2023-05-02 10:57:21 +02:00
avienc.c
avio_internal.h
avio.c
avio.h
aviobuf.c
avisynth.c
avlanguage.c
avlanguage.h
avr.c
avs2dec.c
avs3dec.c
avs.c
bethsoftvid.c
bfi.c
bink.c
binka.c
bintext.c
bit.c
bluray.c
bmv.c
boadec.c
bonk.c
brstm.c
c93.c
cache.c
caf.c
caf.h
cafdec.c
cafenc.c
cavsvideodec.c
cdg.c
cdxl.c
chromaprint.c
cinedec.c
codec2.c
concat.c avformat/concatf: check if any nodes were allocated 2023-04-14 10:04:47 -03:00
concatdec.c
crcenc.c
crypto.c
dash.c
dash.h
dashdec.c
dashenc.c
data_uri.c
dauddec.c lavf/dauddec: set timebase to 1/samplerate 2023-04-28 14:31:55 +02:00
daudenc.c
dca_sample_rate_tab.c
dcstr.c
demux_utils.c
demux.c avformat/demux: add support to derive timestamps from packet durations for video 2023-05-25 19:51:47 +02:00
demux.h
derf.c
dfa.c
dfpwmdec.c
dhav.c
diracdec.c
dnxhddec.c
dovi_isom.c
dovi_isom.h
dsfdec.c
dsicin.c
dss.c
dtsdec.c
dtshddec.c
dump.c
dv.c lavf/dv: use a more granular timebase for audio 2023-05-02 10:57:21 +02:00
dv.h lavf/dv: do not set video timebase more than once 2023-05-02 10:57:21 +02:00
dvbsub.c
dvbtxt.c
dvenc.c
dxa.c
eacdata.c
electronicarts.c
epafdec.c
ffmeta.h
ffmetadec.c
ffmetaenc.c
fifo_test.c
fifo.c
file_open.c
file.c
filmstripdec.c lavf: return AVERROR_EOF rather than EIO on EOF 2023-03-27 17:14:31 +02:00
filmstripenc.c
fitsdec.c avformat/fits*: format does not store timestamps 2023-05-21 20:59:23 +02:00
fitsenc.c avformat/fits*: format does not store timestamps 2023-05-21 20:59:23 +02:00
flac_picture.c
flac_picture.h
flacdec.c
flacenc_header.c
flacenc.c
flacenc.h
flic.c
flv.h
flvdec.c
flvenc.c avformat/flvenc: avoid an extra allocate 2023-04-15 04:21:33 +08:00
format.c avformat/format: Remove redundant FFMIN() in ff_match_url_ext() 2023-05-22 02:49:48 +02:00
framecrcenc.c
framehash.c
frmdec.c
fsb.c
ftp.c
fwse.c
g722.c
g723_1.c
g726.c
g729dec.c
gdv.c
genh.c
gif.c avformat/gif: use last frame duration 2023-05-20 13:06:38 +02:00
gifdec.c avformat/gifdec: switch to using gif parser 2023-05-25 19:51:56 +02:00
golomb_tab.c
gopher.c
gsmdec.c
gxf.c
gxf.h
gxfenc.c
h261dec.c
h263dec.c
h264dec.c
hashenc.c
hca.c
hcom.c
hdsenc.c
hevc.c
hevc.h
hevcdec.c
hls_sample_encryption.c
hls_sample_encryption.h
hls.c avformat/hls: remove non standard hls extension 2023-05-22 02:49:58 +02:00
hlsenc.c
hlsplaylist.c
hlsplaylist.h
hlsproto.c
hnm.c
http.c
http.h
httpauth.c
httpauth.h
icecast.c
icodec.c
icoenc.c
id3v1.c
id3v1.h
id3v2.c
id3v2.h
id3v2enc.c
idcin.c
idroqdec.c lavf: return AVERROR_EOF rather than EIO on EOF 2023-03-27 17:14:31 +02:00
idroqenc.c
iff.c
ifv.c
ilbc.c
imf_cpl.c avformat/imf: clean-up logging 2023-05-31 09:03:58 -07:00
imf.h avformat/imf: clean-up logging 2023-05-31 09:03:58 -07:00
imfdec.c avformat/imf: clean-up logging 2023-05-31 09:03:58 -07:00
img2_alias_pix.c
img2_brender_pix.c
img2.c
img2.h
img2dec.c avformat/jpegxl_anim_dec: add animated JPEG XL demuxer 2023-06-05 12:15:05 -04:00
img2enc.c
imx.c
ingenientdec.c
internal.h lavf: use AV_CODEC_PROP_FIELDS where appropriate 2023-05-15 10:31:55 +02:00
ip.c
ip.h
ipfsgateway.c
ipmovie.c
ipudec.c
ircam.c
ircam.h
ircamdec.c
ircamenc.c
isom_tags.c
isom.c
isom.h
iss.c
iv8.c
ivfdec.c
ivfenc.c
jacosubdec.c
jacosubenc.c
jpegtables.c
jpegxl_anim_dec.c avformat/jpegxl_anim_dec: add animated JPEG XL demuxer 2023-06-05 12:15:05 -04:00
jpegxl_probe.c avformat/jpegxl_probe: check length instead of blindly reading 2023-06-11 21:11:21 -04:00
jpegxl_probe.h avformat/jpegxl_anim_dec: add animated JPEG XL demuxer 2023-06-05 12:15:05 -04:00
jvdec.c
kvag.c
lafdec.c
latmenc.c
libamqp.c
libavformat.v
libgme.c
libmodplug.c
libopenmpt.c
librist.c
librtmp.c
libsmbclient.c
libsrt.c
libssh.c
libzmq.c
lmlm4.c
loasdec.c
log2_tab.c
lrc.c
lrc.h
lrcdec.c
lrcenc.c
luodatdec.c
lvfdec.c
lxfdec.c
m4vdec.c
Makefile avformat/jpegxl_anim_dec: add animated JPEG XL demuxer 2023-06-05 12:15:05 -04:00
matroska.c
matroska.h avformat/matroska: add a few more Block Addition ID Type enum values 2023-04-05 09:47:12 -03:00
matroskadec.c avformat/matroskadec: also export non-HDR10+ ITU-T T.35 payloads as BlockAdditional side data 2023-04-10 18:52:08 -03:00
matroskaenc.c avformat/matroskaenc: remove accidental variable shadowing 2023-05-20 09:28:46 -03:00
mca.c
mccdec.c
md5proto.c
metadata.c
metadata.h
mgsts.c
microdvddec.c
microdvdenc.c
mj2kdec.c
mkvtimestamp_v2.c
mlpdec.c
mlvdec.c
mm.c
mmf.c
mms.c
mms.h
mmsh.c
mmst.c
mods.c
moflex.c
mov_chan.c
mov_chan.h
mov_esds.c
mov.c avformat/mov: decrease probe score for a random tag 2023-06-08 11:16:46 +08:00
movenc_ttml.c
movenc_ttml.h
movenc.c avformat/movenc: factorize determining mdhd/mvhd/tkhd version 2023-04-24 23:00:50 +02:00
movenc.h
movenccenc.c
movenccenc.h
movenchint.c
mp3dec.c
mp3enc.c
mpc8.c
mpc.c
mpeg4audio_sample_rates.c
mpeg.c lavf/mpeg: Add G.711 A law support 2023-03-25 22:14:09 +08:00
mpeg.h
mpegaudiotabs.c
mpegenc.c
mpegts.c lavf/mpegts.c: set some properties for ARIB caption 2023-03-28 12:04:52 -04:00
mpegts.h
mpegtsenc.c avformat/mpegts: add support for preserving SMPTE 2038 when transcoding MPEG-TS streams 2023-03-26 18:51:25 +02:00
mpegvideodec.c
mpjpeg.c
mpjpegdec.c
mpl2dec.c
mpsubdec.c
msf.c
msnwc_tcp.c
mspdec.c
mtaf.c
mtv.c
musx.c
mux_utils.c
mux.c lavf/mux: clarify log messages when choosing oformat fails 2023-04-04 11:44:54 +02:00
mux.h
mvdec.c
mvi.c
mxf.c avformat/mxfdec: recognize AAC per SMPTE ST 381-4 2023-05-11 22:37:41 +02:00
mxf.h
mxfdec.c avformat/mxfdec: recognize AAC per SMPTE ST 381-4 2023-05-11 22:37:41 +02:00
mxfenc.c avformat/mxfenc: reject unsupported ffv1 versions 2023-04-06 00:50:01 +02:00
mxg.c
ncdec.c
network.c libavformat/tcp: add local_addr/local_port for network option 2023-03-30 12:09:49 +02:00
network.h libavformat/tcp: add local_addr/local_port for network option 2023-03-30 12:09:49 +02:00
nistspheredec.c
nspdec.c
nsvdec.c
nullenc.c
nut.c
nut.h
nutdec.c
nutenc.c
nuv.c
oggdec.c
oggdec.h
oggenc.c
oggparsecelt.c
oggparsedirac.c
oggparseflac.c avformat/oggparseflac: use the GetByteContext API 2023-06-01 19:51:06 -03:00
oggparseogm.c
oggparseopus.c
oggparseskeleton.c
oggparsespeex.c
oggparsetheora.c avformat/oggparsetheora: clip duration within 64bit 2023-06-04 18:21:25 +02:00
oggparsevorbis.c lavf/oggdec: fix demux with unrecognized header packets 2023-03-28 16:46:03 -04:00
oggparsevp8.c
oma.c
oma.h
omadec.c
omaenc.c
options_table.h
options.c lavf: fall back to a more meaningful log instance name 2023-04-04 11:42:52 +02:00
os_support.c
os_support.h
paf.c
pcm.c
pcm.h
pcmdec.c
pcmenc.c
pdvdec.c avformat: add PDV demuxer 2023-04-20 16:11:18 +02:00
pjsdec.c
pmpdec.c
pp_bnk.c
prompeg.c
protocols.c
psxstr.c
pva.c
pvfdec.c
qcp.c
qtpalette.c
qtpalette.h
r3d.c
rangecoder_dec.c avformat/mxfenc: SMPTE RDD 48:2018 Amd 1:2022 support 2023-03-25 19:28:36 +01:00
rawdec.c lavf/rawdec: stop setting codec context framerate 2023-05-05 14:49:40 +02:00
rawdec.h lavf/rawdec: mark raw demuxers as having no timestamps 2023-04-13 15:34:07 +02:00
rawenc.c
rawenc.h
rawutils.c
rawutils.h
rawvideodec.c
rdt.c
rdt.h
realtextdec.c
redspark.c
replaygain.c
replaygain.h
riff.c avcodec: add RTV1 decoder 2023-06-07 09:00:18 +02:00
riff.h
riffdec.c
riffenc.c
rka.c
rl2.c
rm.c
rm.h
rmdec.c
rmenc.c
rmsipr.c
rmsipr.h
rpl.c
rsd.c
rso.c
rso.h
rsodec.c
rsoenc.c
rtmp.h
rtmpcrypt.c
rtmpcrypt.h
rtmpdh.c
rtmpdh.h
rtmpdigest.c
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_rfc4175.c
rtpenc_vc2hq.c
rtpenc_vp8.c
rtpenc_vp9.c
rtpenc_xiph.c
rtpenc.c
rtpenc.h
rtpproto.c
rtpproto.h
rtsp.c
rtsp.h
rtspcodes.h
rtspdec.c
rtspenc.c
s337m.c
samidec.c
sapdec.c
sapenc.c
sauce.c
sauce.h
sbcdec.c
sbgdec.c
sccdec.c
sccenc.c
scd.c
sctp.c
sdns.c
sdp.c
sdr2.c
sdsdec.c
sdxdec.c
seek.c libavformat: Improve ff_configure_buffers_for_index for excessive deltas 2023-04-02 00:34:53 +03:00
segafilm.c
segafilmenc.c
segment.c
serdec.c
sga.c
shortendec.c
sierravmd.c
siff.c
smacker.c
smjpeg.c
smjpeg.h
smjpegdec.c
smjpegenc.c
smoothstreamingenc.c avformat/smoothstreamingenc: do not override movflag defaults 2023-04-24 23:00:50 +02:00
smush.c
sol.c lavf: return AVERROR_EOF rather than EIO on EOF 2023-03-27 17:14:31 +02:00
sox.h
soxdec.c
soxenc.c
spdif.c
spdif.h
spdifdec.c
spdifenc.c
srtdec.c
srtenc.c
srtp.c
srtp.h
srtpproto.c
stldec.c
subfile.c
subtitles.c
subtitles.h
subviewer1dec.c
subviewerdec.c
supdec.c
supenc.c
svag.c
svs.c
swf.c
swf.h
swfdec.c
swfenc.c
takdec.c
tcp.c avformat/tcp: correct strdup check 2023-04-02 10:18:56 +05:30
tedcaptionsdec.c
tee_common.c
tee_common.h
tee.c
teeproto.c
thp.c
tiertexseq.c
tls_gnutls.c
tls_libtls.c
tls_mbedtls.c
tls_openssl.c
tls_schannel.c
tls_securetransport.c
tls.c
tls.h
tmv.c
to_upper4.c
tta.c
ttaenc.c
ttmlenc.c
ttmlenc.h
tty.c
txd.c
ty.c
udp.c
uncodedframecrcenc.c
unix.c
url.c
url.h
urldecode.c
urldecode.h
utils.c
vag.c
vapoursynth.c
vc1dec.c
vc1test.c lavf: return AVERROR_EOF rather than EIO on EOF 2023-03-27 17:14:31 +02:00
vc1testenc.c
version_major.h
version.c
version.h avformat/jpegxl_anim_dec: add animated JPEG XL demuxer 2023-06-05 12:15:05 -04:00
vividas.c
vivo.c
voc_packet.c
voc.c
voc.h
vocdec.c
vocenc.c
vorbiscomment.c
vorbiscomment.h
vpcc.c
vpcc.h
vpk.c
vplayerdec.c
vqf.c
w64.c
w64.h
wady.c
wavarc.c
wavdec.c avformat/wavdec: Check that smv block fits in available space 2023-05-22 02:49:58 +02:00
wavenc.c
wc3movie.c
webm_chunk.c
webmdashenc.c
webpenc.c
webvttdec.c
webvttenc.c
westwood_aud.c
westwood_audenc.c
westwood_vqa.c
wsddec.c
wtv_common.c
wtv.h
wtvdec.c
wtvenc.c
wv.c
wv.h
wvdec.c
wvedec.c
wvenc.c
xa.c
xmd.c
xmv.c
xvag.c
xwma.c
yop.c
yuv4mpeg.h
yuv4mpegdec.c
yuv4mpegenc.c avformat/yuvmpegenc: add support for rawvideo input 2023-05-18 17:31:37 -03:00