mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
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
66f42ad1d5
commit
ecfdecabfb
@ -157,6 +157,8 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh
|
|||||||
|
|
||||||
/* restore top left pixel */
|
/* restore top left pixel */
|
||||||
val = loco_get_rice(&rc);
|
val = loco_get_rice(&rc);
|
||||||
|
if (val == INT_MIN)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
data[0] = 128 + val;
|
data[0] = 128 + val;
|
||||||
/* restore top line */
|
/* restore top line */
|
||||||
for (i = 1; i < width; i++) {
|
for (i = 1; i < width; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user