[FFmpeg-cvslog] avcodec/imm4: Use ff_set_dimensions()

2019-01-21 Thread Michael Niedermayer
ffmpeg | branch: release/4.1 | Michael Niedermayer  | 
Fri Nov  9 23:07:23 2018 +0100| [b66152a4e5e578c731f7e59e43f4db6b77d7c6d6] | 
committer: Michael Niedermayer

avcodec/imm4: Use ff_set_dimensions()

Fixes: Out of memory
Fixes: 
10970/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IMM4_fuzzer-5698750043914240

Reviewed-by: Paul B Mahol 
Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
(cherry picked from commit c305e134ce23b46a1164527ade3e1b7e2ecedf5f)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b66152a4e5e578c731f7e59e43f4db6b77d7c6d6
---

 libavcodec/imm4.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c
index a4e9b5d4d2..b72f0be28e 100644
--- a/libavcodec/imm4.c
+++ b/libavcodec/imm4.c
@@ -428,8 +428,9 @@ static int decode_frame(AVCodecContext *avctx, void *data,
 av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n");
 return AVERROR_INVALIDDATA;
 }
-avctx->width = width;
-avctx->height = height;
+ret = ff_set_dimensions(avctx, width, height);
+if (ret < 0)
+return ret;
 }
 
 s->changed_size = 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/imm4: Use ff_set_dimensions()

2018-11-10 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Nov  9 23:07:23 2018 +0100| [c305e134ce23b46a1164527ade3e1b7e2ecedf5f] | 
committer: Michael Niedermayer

avcodec/imm4: Use ff_set_dimensions()

Fixes: Out of memory
Fixes: 
10970/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IMM4_fuzzer-5698750043914240

Reviewed-by: Paul B Mahol 
Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c305e134ce23b46a1164527ade3e1b7e2ecedf5f
---

 libavcodec/imm4.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c
index a4e9b5d4d2..b72f0be28e 100644
--- a/libavcodec/imm4.c
+++ b/libavcodec/imm4.c
@@ -428,8 +428,9 @@ static int decode_frame(AVCodecContext *avctx, void *data,
 av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n");
 return AVERROR_INVALIDDATA;
 }
-avctx->width = width;
-avctx->height = height;
+ret = ff_set_dimensions(avctx, width, height);
+if (ret < 0)
+return ret;
 }
 
 s->changed_size = 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog