From 2a7545951926a17459cbde045a4c5f8cca7cbc46 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 23 Aug 2013 18:55:55 +0000 Subject: 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: Paul B Mahol --- libavcodec/pngdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/pngdec.c') diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index c8897b9e10..436e7986b4 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -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; } -- cgit v1.2.3