avformat/mov: prevent potential use of uninitialized value

release/5.1
Martijn van Beurden 3 years ago committed by Paul B Mahol
parent 056a9fac5b
commit c8d839df73
  1. 5
      libavformat/mov.c

@ -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) {

Loading…
Cancel
Save