History

avcodec/dirac_dwt_template: Fix integer overflow in vertical_compose53iL0()

Fixes: runtime error: signed integer overflow: 2147483646 + 2 cannot be represented in type 'int' Fixes: 3013/clusterfuzz-testcase-minimized-4644084197097472

Michael Niedermayer committed 9 years ago

Commit a165b531 parent f5361ee1 file · +1 −1Browse files

Unified · Split

libavcodec/dirac_dwt_template.c+1−1
@@ -49,7 +49,7 @@ static void RENAME(vertical_compose53iL0)(uint8_t *_b0, uint8_t *_b1, uint8_t *_ · 48 unmodified lines
4949 TYPE *b1 = (TYPE *)_b1;
5050 TYPE *b2 = (TYPE *)_b2;
5151 for (i = 0; i < width; i++)
52− b1[i] -= (b0[i] + b2[i] + 2) >> 2;
52+ b1[i] -= (int)(b0[i] + (unsigned)b2[i] + 2) >> 2;
5353 }
5454
5555 static av_always_inline void RENAME(interleave)(TYPE *dst, TYPE *src0, TYPE *src1, int w2,

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