Re: [FFmpeg-devel] [PATCH 1/2] avcodec/hq_hqa: Use ff_set_dimensions()

2019-07-08 Thread Michael Niedermayer
On Sun, Jun 30, 2019 at 12:30:15AM +0200, Michael Niedermayer wrote:
> Fixes: 
> 15530/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5637370344374272
> Fixes: signed integer overflow: 65312 * 65312 cannot be represented in type 
> 'int'
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/hq_hqa.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)

will apply patchset

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

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope


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/2] avcodec/hq_hqa: Use ff_set_dimensions()

2019-06-29 Thread Michael Niedermayer
Fixes: 
15530/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5637370344374272
Fixes: signed integer overflow: 65312 * 65312 cannot be represented in type 
'int'

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

diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index 90bafdc72a..eec2e980b3 100644
--- a/libavcodec/hq_hqa.c
+++ b/libavcodec/hq_hqa.c
@@ -254,10 +254,12 @@ static int hqa_decode_frame(HQContext *ctx, AVFrame *pic, 
size_t data_size)
 width  = bytestream2_get_be16(>gbc);
 height = bytestream2_get_be16(>gbc);
 
+ret = ff_set_dimensions(ctx->avctx, width, height);
+if (ret < 0)
+return ret;
+
 ctx->avctx->coded_width = FFALIGN(width,  16);
 ctx->avctx->coded_height= FFALIGN(height, 16);
-ctx->avctx->width   = width;
-ctx->avctx->height  = height;
 ctx->avctx->bits_per_raw_sample = 8;
 ctx->avctx->pix_fmt = AV_PIX_FMT_YUVA422P;
 
-- 
2.22.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".