mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-16 20:07:04 +00:00
avcodec/loco: Fix integer overflow with large values from loco_get_rice()
Fixes: signed integer overflow: 155 + 2147483647 cannot be represented in type 'int'
Fixes: 23421/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5652849097965568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3ddc5e1f3c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bcbfcf1300
commit
b8f3879bcc
@ -131,7 +131,7 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh
|
|||||||
int stride, const uint8_t *buf, int buf_size)
|
int stride, const uint8_t *buf, int buf_size)
|
||||||
{
|
{
|
||||||
RICEContext rc;
|
RICEContext rc;
|
||||||
int val;
|
unsigned val;
|
||||||
int ret;
|
int ret;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user