Fixes: CID1604495 Overflowed constant
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -157,6 +157,8 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh · 156 unmodified lines | ||
| 157 | 157 | |
| 158 | 158 | /* restore top left pixel */ |
| 159 | 159 | val = loco_get_rice(&rc); |
| 160 | + if (val == INT_MIN) | |
| 161 | + return AVERROR_INVALIDDATA; | |
| 160 | 162 | data[0] = 128 + val; |
| 161 | 163 | /* restore top line */ |
| 162 | 164 | for (i = 1; i < width; i++) { |