mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/loco: Check loco_get_rice() for failure
Fixes: CID1604495 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d553276843
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1a0f4df41b
commit
deb5899fd1
|
@ -156,6 +156,8 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh
|
|||
|
||||
/* restore top left pixel */
|
||||
val = loco_get_rice(&rc);
|
||||
if (val == INT_MIN)
|
||||
return AVERROR_INVALIDDATA;
|
||||
data[0] = 128 + val;
|
||||
/* restore top line */
|
||||
for (i = 1; i < width; i++) {
|
||||
|
|
Loading…
Reference in New Issue