avformat/mpeg: Check an avio_read() for failure
Fixes: use-of-uninitialized-value
Fixes: 70849/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGPS_fuzzer-4684401009557504
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 66ee75d76c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4eceda7528
commit
c9a2d48c2e
2 changed files with 5 additions and 3 deletions
|
|
@ -187,8 +187,8 @@ static int decode_frame(AVCodecContext *avctx,
|
|||
av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", ret);
|
||||
return AVERROR_EXTERNAL;
|
||||
}
|
||||
if (zstream->avail_out > 0)
|
||||
memset(zstream->next_out, 0, zstream->avail_out);
|
||||
if (s->zstream.avail_out > 0)
|
||||
memset(s->zstream.next_out, 0, s->zstream.avail_out);
|
||||
}
|
||||
}
|
||||
} else if (type == MKTAG('H','U','F','Y')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue