Browse Source

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>
tags/n2.1
Paul B Mahol 12 years ago
parent
commit
2a75459519
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/pngdec.c

+ 1
- 1
libavcodec/pngdec.c View File

@@ -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;
}



Loading…
Cancel
Save