Fixes: out of array access Fixes: 70741/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5703668010647552
Unified · Split
| @@ -428,7 +428,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ · 427 unmodified lines | |||
| 428 | !FF_ALLOCZ_TYPED_ARRAY(s->spatial_dwt_buffer, width * height) || //FIXME this does not belong here | 428 | !FF_ALLOCZ_TYPED_ARRAY(s->spatial_dwt_buffer, width * height) || //FIXME this does not belong here |
| 429 | !FF_ALLOCZ_TYPED_ARRAY(s->temp_dwt_buffer, width) || | 429 | !FF_ALLOCZ_TYPED_ARRAY(s->temp_dwt_buffer, width) || |
| 430 | !FF_ALLOCZ_TYPED_ARRAY(s->temp_idwt_buffer, width) || | 430 | !FF_ALLOCZ_TYPED_ARRAY(s->temp_idwt_buffer, width) || |
| 431 | !FF_ALLOCZ_TYPED_ARRAY(s->run_buffer, ((width + 1) >> 1) * ((height + 1) >> 1))) | 431 | !FF_ALLOCZ_TYPED_ARRAY(s->run_buffer, ((width + 1) >> 1) * ((height + 1) >> 1) + 1)) |
| 432 | return AVERROR(ENOMEM); | 432 | return AVERROR(ENOMEM); |
| 433 | 433 | ||
| 434 | for(i=0; i<MAX_REF_FRAMES; i++) { | 434 | for(i=0; i<MAX_REF_FRAMES; i++) { |