1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/mov: prevent potential use of uninitialized value

This commit is contained in:
Martijn van Beurden 2022-06-11 09:32:16 +02:00 committed by Paul B Mahol
parent 056a9fac5b
commit c8d839df73

View File

@ -6797,7 +6797,10 @@ static int mov_read_dfla(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb24(pb); /* Flags */
avio_read(pb, buf, sizeof(buf));
if (avio_read(pb, buf, sizeof(buf)) != sizeof(buf)) {
av_log(c->fc, AV_LOG_ERROR, "failed to read FLAC metadata block header\n");
return pb->error < 0 ? pb->error : AVERROR_INVALIDDATA;
}
flac_parse_block_header(buf, &last, &type, &size);
if (type != FLAC_METADATA_TYPE_STREAMINFO || size != FLAC_STREAMINFO_SIZE) {