History

avcodec/loco: Check loco_get_rice() for failure

Fixes: CID1604495 Overflowed constant

Michael Niedermayer committed 2 years ago

Commit d5532761 parent b9899861 file · +2 −0Browse files

Unified · Split

libavcodec/loco.c+2−0
@@ -157,6 +157,8 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh · 156 unmodified lines
157 157
158 /* restore top left pixel */158 /* restore top left pixel */
159 val = loco_get_rice(&rc);159 val = loco_get_rice(&rc);
160 if (val == INT_MIN)
161 return AVERROR_INVALIDDATA;
160 data[0] = 128 + val;162 data[0] = 128 + val;
161 /* restore top line */163 /* restore top line */
162 for (i = 1; i < width; i++) {164 for (i = 1; i < width; 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