Commit 2a754595 authored by Paul B Mahol's avatar Paul B Mahol

pngdec: do not release buffer on failure instead report full progress

Should fix heap-use-after-free as reported by Address Sanitizer.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent b329ff3d
......@@ -868,8 +868,8 @@ static int decode_frame(AVCodecContext *avctx,
return ret;
fail:
av_dict_free(&metadata);
ff_thread_report_progress(&s->picture, INT_MAX, 0);
ret = AVERROR_INVALIDDATA;
ff_thread_release_buffer(avctx, &s->picture);
goto the_end;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment