diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-08-19 17:02:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-08-28 16:27:54 +0200 |
commit | 796ff2d599449ed798b69ab798ebcbcc0a5853f5 (patch) | |
tree | 13de1d24b9943c429595b8b6e3a1dd9ea4f40789 | |
parent | b08776e3ae9a5315c19e8619ca71921006c1abe1 (diff) | |
download | ffmpeg-796ff2d599449ed798b69ab798ebcbcc0a5853f5.tar.gz |
avformat/apetag: Check APETAGEX
Fixes: Use of uninitialized value
Fixes: 71074/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5697034877730816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/apetag.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/apetag.c b/libavformat/apetag.c index bd0a19e4d6..0989fcb094 100644 --- a/libavformat/apetag.c +++ b/libavformat/apetag.c @@ -121,7 +121,8 @@ int64_t ff_ape_parse_tag(AVFormatContext *s) avio_seek(pb, file_size - APE_TAG_FOOTER_BYTES, SEEK_SET); - avio_read(pb, buf, 8); /* APETAGEX */ + if(avio_read(pb, buf, 8) != 8) /* APETAGEX */ + return 0; if (strncmp(buf, APE_TAG_PREAMBLE, 8)) { return 0; } |