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

Showing the changes to libavcodec (1 of 1 file). Show all

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
157157
158158 /* restore top left pixel */
159159 val = loco_get_rice(&rc);
160+ if (val == INT_MIN)
161+ return AVERROR_INVALIDDATA;
160162 data[0] = 128 + val;
161163 /* restore top line */
162164 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