[FFmpeg-cvslog] pngdec: do not release buffer on failure instead report full progress
Paul B Mahol
git at videolan.org
Sat Aug 24 00:02:26 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Aug 23 18:55:55 2013 +0000| [2a7545951926a17459cbde045a4c5f8cca7cbc46] | committer: 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: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a7545951926a17459cbde045a4c5f8cca7cbc46
---
libavcodec/pngdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index c8897b9..436e798 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;
}
More information about the ffmpeg-cvslog
mailing list