aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-08-23 18:55:55 +0000
committerPaul B Mahol <onemda@gmail.com>2013-08-23 21:08:32 +0000
commit2a7545951926a17459cbde045a4c5f8cca7cbc46 (patch)
treede6df865f3b7cfc7eb532cf67da961fcc87001eb /libavcodec/pngdec.c
parentb329ff3d43caf5978dee3740c701267e703cb337 (diff)
downloadandroid_external_ffmpeg-2a7545951926a17459cbde045a4c5f8cca7cbc46.tar.gz
android_external_ffmpeg-2a7545951926a17459cbde045a4c5f8cca7cbc46.tar.bz2
android_external_ffmpeg-2a7545951926a17459cbde045a4c5f8cca7cbc46.zip
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@gmail.com>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c2
1 files changed, 1 insertions, 1 deletions
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;
}