mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/loco: Check left column value
Fixes: Timeout (42sec -> 379 ms)
Fixes: 16323/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5679178099195904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c812db814e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
50b07e145b
commit
36e3470195
@ -159,6 +159,8 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh
|
|||||||
for (j = 1; j < height; j++) {
|
for (j = 1; j < height; j++) {
|
||||||
/* restore left column */
|
/* restore left column */
|
||||||
val = loco_get_rice(&rc);
|
val = loco_get_rice(&rc);
|
||||||
|
if (val == INT_MIN)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
data[0] = data[-stride] + val;
|
data[0] = data[-stride] + val;
|
||||||
/* restore all other pixels */
|
/* restore all other pixels */
|
||||||
for (i = 1; i < width; i++) {
|
for (i = 1; i < width; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user