History

avcodec/snow: Fix off by 1 error in run_buffer

Fixes: out of array access Fixes: 70741/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5703668010647552

Michael Niedermayer committed 2 years ago

Commit 06f5ed41 parent 58fbeb51 file · +1 −1Browse files

Unified · Split

libavcodec/snow.c+1−1
@@ -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 here428 !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++) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t