FFmpeg/libavformat
Michael Niedermayer 2b9ab80757
avformat/spdifdec: Use 64bit to compute bit rate
Fixes: signed integer overflow: 32 * 553590816 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6564974517944320

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 4075f0cec1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-10-21 22:19:37 +02:00
..
tests
.gitignore
3dostr.c avformat/3dostr: Check sample_rate 2021-10-09 22:02:20 +02:00
4xm.c avformat/4xm: Check for duplicate track ids 2022-01-13 22:50:49 +01:00
a64.c
aacdec.c
aadec.c avformat/aadec: Check toc_size to contain the minimum to demuxer uses 2020-07-01 12:49:26 +02:00
ac3dec.c
acm.c
act.c avformat/act: Check ff_get_wav_header() for failure 2022-10-21 22:19:37 +02:00
adp.c
ads.c avformat/ads: Check size 2021-10-09 22:02:20 +02:00
adtsenc.c avformat/adtsenc: return value check for init_get_bits in adts_decode_extradata 2021-10-09 22:02:21 +02:00
adxdec.c
aea.c
afc.c
aiff.h
aiffdec.c avformat/aiffdec: Use 64bit for block_duration use 2022-10-21 22:19:37 +02:00
aiffenc.c
aixdec.c
allformats.c
amr.c libavformat/amr.c: Check return value from avio_read() 2020-07-01 12:49:26 +02:00
anm.c
apc.c
ape.c avformat/ape: Check frames size 2022-10-21 22:19:37 +02:00
apetag.c
apetag.h
apngdec.c
apngenc.c
aqtitledec.c avformat/aqtitledec: Skip unrepresentable durations 2022-03-28 23:17:54 +02:00
asf.c
asf.h
asfcrypt.c
asfcrypt.h
asfdec_f.c avformat/asfdec_f: Use 64bit for packet start time 2022-10-21 22:19:37 +02:00
asfdec_o.c avformat/asfdec_o: Limit packet offset 2022-10-21 22:19:37 +02:00
asfenc.c
assdec.c avformat/assdec: Fix memleak upon read header failure 2020-07-03 16:15:57 +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-10-09 22:02:19 +02:00
audiointerleave.c
audiointerleave.h
avc.c
avc.h
avformat.h avformat: Add max_streams option 2016-12-11 00:21:53 +01:00
avformatres.rc
avi.h
avidec.c avformat/avidec: Check height 2022-03-28 22:51:59 +02:00
avienc.c libavformat/avienc: Check bits per sample for PAL8 2020-07-01 12:49:26 +02:00
avio_internal.h
avio.c avformat/avio: Check av_opt_copy() for failure 2021-10-09 22:02:20 +02:00
avio.h
aviobuf.c avformat/aviobuf: Don't check for overflow after it happened 2020-07-03 16:14:47 +02:00
avisynth.c
avlanguage.c
avlanguage.h
avr.c
avs.c avformat/avs: Use 64bit for the avio_tell() output 2021-10-09 22:02:19 +02:00
bethsoftvid.c avformat/bethsoftvid: Check image dimensions before use 2021-10-09 22:02:19 +02:00
bfi.c avformat/bfi: Check offsets better 2022-10-21 22:19:37 +02:00
bink.c
bintext.c avformat/bintext: Check width 2021-10-09 22:02:19 +02:00
bit.c
bluray.c
bmv.c
boadec.c
brstm.c
c93.c
cache.c
caf.c
caf.h
cafdec.c avformat/cafdec: Check that nb_frasmes fits within 64bit 2022-10-21 22:19:37 +02:00
cafenc.c
cavsvideodec.c
cdg.c avformat/cdg: Fix integer overflow in duration computation 2021-10-09 22:02:19 +02:00
cdxl.c avformat/cdxl: Fix integer overflow in intermediate 2020-07-01 12:49:26 +02:00
chromaprint.c
cinedec.c avformat/cinedec: Fix index_entries size check 2021-10-09 22:02:20 +02:00
concat.c
concatdec.c avformat/concatdec: use av_strstart() 2021-10-09 22:02:19 +02:00
crcenc.c
crypto.c
cutils.c
dashenc.c
data_uri.c
dauddec.c
daudenc.c
dcstr.c avformat/dcstr: Check sample rate 2021-10-09 22:02:20 +02:00
dfa.c
diracdec.c
dnxhddec.c
dsfdec.c avformat/dsfdec: Check block_align more completely 2021-10-09 22:02:19 +02:00
dsicin.c avformat/dsicin: Check packet size for overflow 2021-10-09 22:02:21 +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-10-21 22:19:37 +02:00
eacdata.c
electronicarts.c avformat/electronicarts: Clear partial_packet on error 2021-10-09 22:02:20 +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
flac_picture.c
flac_picture.h
flacdec.c
flacenc_header.c
flacenc.c
flacenc.h
flic.c
flv.h Merge commit 'a7ac1a7b94447f33ae95be4d6d186e2775977f91' 2015-06-12 22:55:49 +02:00
flvdec.c avformat/flvdec: Check for EOF in index reading 2022-10-21 22:19:37 +02:00
flvenc.c
format.c
framecrcenc.c
framehash.c
frmdec.c
fsb.c
ftp.c avformat/ftp: Check for av_strtok() failure 2021-10-09 22:02:21 +02:00
g722.c
g723_1.c
g729dec.c
genh.c avformat/genh: Check sample rate 2022-06-14 16:53:26 +02:00
gif.c
gifdec.c
golomb_tab.c
gopher.c
gsmdec.c
gxf.c avformat/gxf: Check pkt_len 2021-10-09 22:02:19 +02:00
gxf.h
gxfenc.c
h261dec.c
h263dec.c
h264dec.c
hashenc.c
hdsenc.c
hevc.c
hevc.h
hevcdec.c
hls.c libavformat/hls: Free keys 2022-10-21 22:19:37 +02:00
hlsenc.c
hlsproto.c
hnm.c avformat/hnm: Check for extradata allocation failure 2020-07-03 16:14:46 +02:00
http.c
http.h
httpauth.c
httpauth.h
icecast.c
icodec.c avformat/icodec: Check nb_pal 2022-10-21 22:19:37 +02:00
icoenc.c
id3v1.c
id3v1.h
id3v2.c avformat/id3v2: Check end for overflow in id3v2_parse() 2021-10-09 22:02:20 +02:00
id3v2.h
id3v2enc.c
idcin.c
idroqdec.c
idroqenc.c
iff.c libavformat/iff: Check for overflow in body_end calculation 2022-10-21 22:19:37 +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
iss.c
iv8.c
ivfdec.c
ivfenc.c
jacosubdec.c avformat/jacosubdec: Check for min in t overflow in get_shift() 2021-10-09 22:02:21 +02:00
jacosubenc.c
jvdec.c
latmenc.c
libavformat.v
libgme.c
libmodplug.c
libnut.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-10-09 22:02:19 +02:00
lrcenc.c
lvfdec.c avformat/lvfdec: Check stream_index before use 2021-10-09 22:02:19 +02:00
lxfdec.c avformat/lxfdec: Fix multiple integer overflows related to track_size 2021-10-09 22:02:20 +02:00
m4vdec.c
Makefile
matroska.c
matroska.h
matroskadec.c avformat/matroskadec: Check pre_ns 2022-03-28 23:13:16 +02:00
matroskaenc.c avformat/matroskaenc: Don't use NULL for %s format string 2020-07-03 16:16:47 +02:00
md5proto.c
metadata.c
metadata.h
mgsts.c
microdvddec.c avformat/microdvddec: use 64bit for durations 2021-10-09 22:02:20 +02:00
microdvdenc.c
mkvtimestamp_v2.c
mlpdec.c
mlvdec.c avformat/mlvdec: fail reading a packet with 0 streams 2020-07-01 12:49:26 +02:00
mm.c avformat/mm: Check for existence of audio stream 2021-10-09 22:02:19 +02:00
mmf.c
mms.c
mms.h
mmsh.c
mmst.c
mov_chan.c
mov_chan.h
mov.c avformat/mov: Disallow empty sidx 2022-03-28 22:40:33 +02:00
movenc.c aformat/movenc: add missing padding to output track extradata 2022-05-04 18:21:01 +02:00
movenc.h
movenccenc.c
movenccenc.h
movenchint.c
mp3dec.c avformat/mp3dec: Check that the frame fits within the probe buffer 2020-07-01 12:49:26 +02:00
mp3enc.c avformat/mp3enc: Avoid SEEK_END as it is unsupported 2020-07-01 12:11:55 +02:00
mpc8.c avformat/mpc8: Check for position overflow in mpc8_handle_chunk() 2021-10-09 22:02:21 +02:00
mpc.c avformat/mpc: deallocate frames array on errors 2020-07-01 12:11:55 +02:00
mpeg.c avformat/mpeg: Check avio_read() return value in get_pts() 2021-10-09 22:02:19 +02:00
mpeg.h
mpegenc.c avformat/mpegenc: Fix integer overflow with AV_NOPTS_VALUE 2020-07-01 12:49:26 +02:00
mpegts.c avformat/mpegts: use actually read packet size in mpegts_resync special case 2021-10-09 22:02:21 +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 16:15:57 +02:00
mpsubdec.c avformat/mpsubdec: Fix memleak upon read header failure 2020-07-03 16:15:57 +02:00
msf.c avformat/msf: Check that channels doesnt overflow during extradata construction 2021-10-09 22:02:21 +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 22:02:21 +02:00
mvi.c avformat/mvi: Check audio size for more overflows 2021-10-09 22:02:20 +02:00
mxf.c
mxf.h
mxfdec.c avformat/mxfdec: Check for duplicate mxf_read_index_entry_array() 2022-01-13 22:44:11 +01:00
mxfenc.c
mxg.c
ncdec.c
network.c
network.h network: Define ENOTCONN as WSAENOTCONN if not defined 2021-10-09 22:02:21 +02:00
nistspheredec.c
nsvdec.c avformat/nsvdec: Fix memleaks on errors while reading the header 2020-07-01 12:49:26 +02:00
nullenc.c
nut.c
nut.h
nutdec.c avformat/nutdec: Check fields 2022-10-21 22:19:37 +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:44 +02:00
nuv.c
oggdec.c avformat/oggdec: Check for EOF after page header 2020-07-01 12:49:26 +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-01 12:49:26 +02:00
oggparsevp8.c Don't manipulate duration when it's AV_NOPTS_VALUE. 2018-01-08 23:19:14 +01:00
oma.c
oma.h
omadec.c avformat/omadec: Fix memleaks upon read_header failure 2020-07-03 16:14:48 +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-10-09 22:02:20 +02:00
pcm.c
pcm.h
pcmdec.c
pcmenc.c
pjsdec.c avformat/pjsdec: Fix memleak upon read header failure 2020-07-03 16:15:57 +02:00
pmpdec.c
protocols.c
psxstr.c
pva.c
pvfdec.c
qcp.c avformat/qcp: Avoid negative nb_rates 2021-10-09 22:02:21 +02:00
qtpalette.c
qtpalette.h
r3d.c avformat/r3d: Check samples before computing duration 2021-10-09 22:02:20 +02:00
rawdec.c
rawdec.h
rawenc.c
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-10-09 22:02:21 +02:00
redspark.c
replaygain.c
replaygain.h
riff.c
riff.h
riffdec.c
riffenc.c
rl2.c
rm.c
rm.h
rmdec.c avformat/rmdec: check tag_size 2022-10-21 22:19:37 +02:00
rmenc.c
rmsipr.c
rmsipr.h
rpl.c avformat/rpl: The associative law doesnt hold for signed integers in C 2021-10-09 22:02:20 +02:00
rsd.c uavformat/rsd: check for EOF in extradata 2021-10-09 22:02:20 +02:00
rso.c
rso.h
rsodec.c
rsoenc.c
rtmp.h
rtmpcrypt.c
rtmpcrypt.h
rtmpdh.c rtmpdh: Don't use the OpenSSL DH struct 2020-07-01 12:49:26 +02:00
rtmpdh.h rtmpdh: Don't use the OpenSSL DH struct 2020-07-01 12:49:26 +02:00
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_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 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb' 2016-06-21 21:55:34 +02:00
rtpproto.c
rtpproto.h
rtsp.c avformat/rtsp: break on unknown protocols 2022-10-21 22:19:37 +02:00
rtsp.h
rtspcodes.h
rtspdec.c
rtspenc.c
samidec.c avformat/samidec: Sanity check pts 2021-10-09 22:02:20 +02:00
sapdec.c
sapenc.c
sauce.c
sauce.h
sbgdec.c avformat/sbgdec: Check for overflow in timestamp preparation 2021-10-09 22:02:21 +02:00
sctp.c avformat/sctp: close socket on errors 2022-10-21 22:19:37 +02:00
sdp.c
sdr2.c
segafilm.c avformat/segafilm: Do not assume AV_CODEC_ID_NONE is 0 2021-10-09 22:02:19 +02:00
segment.c
shortendec.c avformat/shortendec: Check k in probe 2020-07-01 12:49:26 +02:00
sierravmd.c
siff.c avformat/siff: Reject audio packets without audio stream 2021-10-09 22:02:19 +02:00
smacker.c
smjpeg.c
smjpeg.h
smjpegdec.c avformat/smjpegdec: Check the existence of referred streams 2021-10-09 22:02:19 +02:00
smjpegenc.c
smoothstreamingenc.c avformat/smoothstreaming: Fix memleaks on errors 2020-07-03 16:14:46 +02:00
smush.c
sol.c
sox.h
soxdec.c avformat/soxdec: Check channels to be positive 2021-10-09 22:02:20 +02:00
soxenc.c
spdif.c
spdif.h
spdifdec.c avformat/spdifdec: Use 64bit to compute bit rate 2022-10-21 22:19:37 +02:00
spdifenc.c
srtdec.c avformat/srtdec: Fix memleak upon read header failure 2020-07-03 16:16:47 +02:00
srtenc.c
srtp.c
srtp.h
srtpproto.c
stldec.c avformat/stldec: Fix memleak upon read header failure 2020-07-03 16:16:47 +02:00
subfile.c
subtitles.c avformat/subtitles: Don't increment packet counter prematurely 2020-07-03 16:14:46 +02:00
subtitles.h
subviewer1dec.c avformat/subviewer1dec: Fix memleak upon read header failure 2020-07-03 16:16:47 +02:00
subviewerdec.c avformat/subviewerdec: fail on AV_NOPTS_VALUE 2021-10-09 22:02:19 +02:00
supdec.c
svag.c
swf.c
swf.h Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
swfdec.c
swfenc.c avformat/swfenc: Fix integer overflow in frame rate handling 2020-07-01 12:49:26 +02:00
takdec.c
tcp.c
tedcaptionsdec.c avformat/tedcaptionsdec: Check for overflow in parse_int() 2021-10-09 22:02:20 +02:00
tee_common.c
tee_common.h
tee.c
teeproto.c
thp.c avformat/thp: Check fps 2020-07-01 12:49:26 +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 21:00:53 +03:00
tls_securetransport.c
tls.c
tls.h
tmv.c
tta.c avformat/tta: Check for EOF in index reading loop 2021-10-09 22:02:21 +02:00
ttaenc.c
tty.c avformat/tty: add probe function 2021-10-31 18:45:21 +01: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-02-16 20:09:34 +01:00
v210.c
vag.c
vc1dec.c
vc1test.c
vc1testenc.c
version.h
vivo.c
voc_packet.c avformat/voc_packet: Add a basic check on max_size 2021-10-09 22:02:20 +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 2020-07-01 12:11:55 +02:00
vplayerdec.c avformat/vplayerdec: Fix memleak upon read header failure 2020-07-03 16:16:47 +02:00
vqf.c avformat/vqf: Check len for COMM chunks 2021-10-09 22:02:19 +02:00
w64.c
w64.h
wavdec.c avformat/wavdec: Check smv_block_size 2021-10-09 22:02:21 +02:00
wavenc.c
wc3movie.c avformat/wc3movie: Move wc3_read_close() up 2021-10-09 22:02:19 +02:00
webm_chunk.c avformat/webm_chunk: Specify expected argument length of get_chunk_filename() 2020-07-01 12:11:55 +02:00
webmdashenc.c avformat/webmdashenc: Check codec types 2020-07-03 16:14:47 +02:00
webpenc.c
webvttdec.c avformat/webvttdec: Fix memleak upon read header failure 2020-07-03 16:16:47 +02:00
webvttenc.c
westwood_aud.c
westwood_vqa.c
wsddec.c avformat/wsddec: Fix undefined shift 2020-07-01 12:11:55 +02:00
wtv_common.c
wtv.h
wtvdec.c avformat/wtvdec: Check for EOF before seeking back in parse_media_type() 2021-10-09 22:02:21 +02:00
wtvenc.c
wv.c
wv.h
wvdec.c
wvedec.c
wvenc.c
xa.c
xmv.c avformat/xmv: Make bitrate 64bit 2020-07-01 12:11:55 +02:00
xvag.c
xwma.c avformat/xwma: Use av_rescale() for duration computation 2022-10-21 22:19:37 +02:00
yop.c
yuv4mpeg.h
yuv4mpegdec.c
yuv4mpegenc.c