mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 09:20:01 +01:00
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>
(cherry picked from commit 796ff2d599)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -129,7 +129,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user