Re: [FFmpeg-devel] [PATCH 1/5] avcodec/proresdec2: decode picture header before frame allocation

2019-03-31 Thread Michael Niedermayer
On Sun, Mar 24, 2019 at 11:44:22PM +0100, Michael Niedermayer wrote:
> Fixes: Timeout (21sec -> 0.3sec)
> Fixes: 
> 13716/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-575559145600
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/proresdec2.c | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)

will apply patchset

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"- "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 1/5] avcodec/proresdec2: decode picture header before frame allocation

2019-03-24 Thread Michael Niedermayer
Fixes: Timeout (21sec -> 0.3sec)
Fixes: 
13716/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-575559145600

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/proresdec2.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 6209c229c9..2652a31c81 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -778,9 +778,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *got_frame,
 buf += frame_hdr_size;
 buf_size -= frame_hdr_size;
 
-if ((ret = ff_thread_get_buffer(avctx, &tframe, 0)) < 0)
-return ret;
-
  decode_picture:
 pic_size = decode_picture_header(avctx, buf, buf_size);
 if (pic_size < 0) {
@@ -788,6 +785,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *got_frame,
 return pic_size;
 }
 
+if (ctx->first_field)
+if ((ret = ff_thread_get_buffer(avctx, &tframe, 0)) < 0)
+return ret;
+
 if ((ret = decode_picture(avctx)) < 0) {
 av_log(avctx, AV_LOG_ERROR, "error decoding picture\n");
 return ret;
-- 
2.21.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".