mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/au: cleanup on EOF return in au_read_annotation()
Fixes: memleak Fixes: 26841/clusterfuzz-testcase-minimized-ffmpeg_dem_AU_fuzzer-5174166309044224 Regression since:e680d50eb4
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 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 commitd16974c3dd
) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0040f0f11b
commit
5917653ebd
|
@ -86,8 +86,11 @@ static int au_read_annotation(AVFormatContext *s, int size)
|
|||
av_bprint_init(&bprint, 64, AV_BPRINT_SIZE_UNLIMITED);
|
||||
|
||||
while (size-- > 0) {
|
||||
if (avio_feof(pb))
|
||||
if (avio_feof(pb)) {
|
||||
av_bprint_finalize(&bprint, NULL);
|
||||
av_freep(&key);
|
||||
return AVERROR_EOF;
|
||||
}
|
||||
c = avio_r8(pb);
|
||||
switch(state) {
|
||||
case PARSE_KEY:
|
||||
|
|
Loading…
Reference in New Issue