[FFmpeg-cvslog] avcodec/pafvideo: Check allocated frame size

2018-04-12 Thread Michael Niedermayer
ffmpeg | branch: release/3.3 | Michael Niedermayer  | 
Sun Feb  4 02:14:49 2018 +0100| [65fc03589fb48ee1d24797ad3984199b01feec82] | 
committer: Michael Niedermayer

avcodec/pafvideo: Check allocated frame size

Fixes: OOM
Fixes: 5549/clusterfuzz-testcase-minimized-5390553567985664

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

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

 libavcodec/pafvideo.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/pafvideo.c b/libavcodec/pafvideo.c
index 6980ae1b35..7c5861dfaf 100644
--- a/libavcodec/pafvideo.c
+++ b/libavcodec/pafvideo.c
@@ -78,6 +78,7 @@ static av_cold int paf_video_init(AVCodecContext *avctx)
 {
 PAFVideoDecContext *c = avctx->priv_data;
 int i;
+int ret;
 
 c->width  = avctx->width;
 c->height = avctx->height;
@@ -90,6 +91,9 @@ static av_cold int paf_video_init(AVCodecContext *avctx)
 }
 
 avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ret = av_image_check_size2(avctx->width, FFALIGN(avctx->height, 256), 
avctx->max_pixels, avctx->pix_fmt, 0, avctx);
+if (ret < 0)
+return ret;
 
 c->pic = av_frame_alloc();
 if (!c->pic)

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


[FFmpeg-cvslog] avcodec/pafvideo: Check allocated frame size

2018-02-11 Thread Michael Niedermayer
ffmpeg | branch: release/3.4 | Michael Niedermayer  | 
Sun Feb  4 02:14:49 2018 +0100| [4423cbf1b4c195ca595379737225c3cf7b22233b] | 
committer: Michael Niedermayer

avcodec/pafvideo: Check allocated frame size

Fixes: OOM
Fixes: 5549/clusterfuzz-testcase-minimized-5390553567985664

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

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

 libavcodec/pafvideo.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/pafvideo.c b/libavcodec/pafvideo.c
index 6980ae1b35..7c5861dfaf 100644
--- a/libavcodec/pafvideo.c
+++ b/libavcodec/pafvideo.c
@@ -78,6 +78,7 @@ static av_cold int paf_video_init(AVCodecContext *avctx)
 {
 PAFVideoDecContext *c = avctx->priv_data;
 int i;
+int ret;
 
 c->width  = avctx->width;
 c->height = avctx->height;
@@ -90,6 +91,9 @@ static av_cold int paf_video_init(AVCodecContext *avctx)
 }
 
 avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ret = av_image_check_size2(avctx->width, FFALIGN(avctx->height, 256), 
avctx->max_pixels, avctx->pix_fmt, 0, avctx);
+if (ret < 0)
+return ret;
 
 c->pic = av_frame_alloc();
 if (!c->pic)

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


[FFmpeg-cvslog] avcodec/pafvideo: Check allocated frame size

2018-02-11 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Feb  4 02:14:49 2018 +0100| [66acb630286cf1bf03bfbdab6c7c784ff20bde61] | 
committer: Michael Niedermayer

avcodec/pafvideo: Check allocated frame size

Fixes: OOM
Fixes: 5549/clusterfuzz-testcase-minimized-5390553567985664

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=66acb630286cf1bf03bfbdab6c7c784ff20bde61
---

 libavcodec/pafvideo.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/pafvideo.c b/libavcodec/pafvideo.c
index 6980ae1b35..7c5861dfaf 100644
--- a/libavcodec/pafvideo.c
+++ b/libavcodec/pafvideo.c
@@ -78,6 +78,7 @@ static av_cold int paf_video_init(AVCodecContext *avctx)
 {
 PAFVideoDecContext *c = avctx->priv_data;
 int i;
+int ret;
 
 c->width  = avctx->width;
 c->height = avctx->height;
@@ -90,6 +91,9 @@ static av_cold int paf_video_init(AVCodecContext *avctx)
 }
 
 avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ret = av_image_check_size2(avctx->width, FFALIGN(avctx->height, 256), 
avctx->max_pixels, avctx->pix_fmt, 0, avctx);
+if (ret < 0)
+return ret;
 
 c->pic = av_frame_alloc();
 if (!c->pic)

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