[FFmpeg-cvslog] avcodec/twinvqdec: Correct overflow in block align check

2020-04-23 Thread Michael Niedermayer
ffmpeg | branch: release/2.8 | Michael Niedermayer  | 
Tue Dec  3 19:48:46 2019 +0100| [97bc7ddc16babdacd310c4d5aa4e6f1e474d5b63] | 
committer: Michael Niedermayer

avcodec/twinvqdec: Correct overflow in block align check

Fixes: signed integer overflow: 538976288 * 8 cannot be represented in type 
'int'
Fixes: 
19126/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TWINVQ_fuzzer-5687464110325760

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

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

 libavcodec/twinvqdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/twinvqdec.c b/libavcodec/twinvqdec.c
index 5f4dd350a0..51b863507a 100644
--- a/libavcodec/twinvqdec.c
+++ b/libavcodec/twinvqdec.c
@@ -404,7 +404,7 @@ static av_cold int twinvq_decode_init(AVCodecContext *avctx)
 tctx->frame_size = avctx->bit_rate * tctx->mtab->size
/ avctx->sample_rate + 8;
 tctx->is_6kbps   = 0;
-if (avctx->block_align && avctx->block_align * 8 / tctx->frame_size > 1) {
+if (avctx->block_align && avctx->block_align * 8LL / tctx->frame_size > 1) 
{
 av_log(avctx, AV_LOG_ERROR,
"VQF TwinVQ should have only one frame per packet\n");
 return AVERROR_INVALIDDATA;

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

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

[FFmpeg-cvslog] avcodec/twinvqdec: Correct overflow in block align check

2019-12-31 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue 
Dec  3 19:48:46 2019 +0100| [4dc93ae3d725e892927f04002021337c2f90252a] | 
committer: Michael Niedermayer

avcodec/twinvqdec: Correct overflow in block align check

Fixes: signed integer overflow: 538976288 * 8 cannot be represented in type 
'int'
Fixes: 
19126/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TWINVQ_fuzzer-5687464110325760

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=4dc93ae3d725e892927f04002021337c2f90252a
---

 libavcodec/twinvqdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/twinvqdec.c b/libavcodec/twinvqdec.c
index c2353f51b5..c00ebb2ad5 100644
--- a/libavcodec/twinvqdec.c
+++ b/libavcodec/twinvqdec.c
@@ -404,7 +404,7 @@ static av_cold int twinvq_decode_init(AVCodecContext *avctx)
 tctx->frame_size = avctx->bit_rate * tctx->mtab->size
/ avctx->sample_rate + 8;
 tctx->is_6kbps   = 0;
-if (avctx->block_align && avctx->block_align * 8 / tctx->frame_size > 1) {
+if (avctx->block_align && avctx->block_align * 8LL / tctx->frame_size > 1) 
{
 av_log(avctx, AV_LOG_ERROR,
"VQF TwinVQ should have only one frame per packet\n");
 return AVERROR_INVALIDDATA;

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

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