diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-12 21:17:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-04 20:26:35 +0200 |
commit | 3349be5745c330867c98dfd3810c0cf04f723c40 (patch) | |
tree | d50620f11a848b8e92f9fd8a4bdfeb7bf72be991 | |
parent | 80ecb421febece8a28a8bf88ff700a6571baf56c (diff) | |
download | ffmpeg-3349be5745c330867c98dfd3810c0cf04f723c40.tar.gz |
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 c812db814ebd603106220854e343558ec1115e57)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/loco.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/loco.c b/libavcodec/loco.c index 5fb414b411..d8bf68a100 100644 --- a/libavcodec/loco.c +++ b/libavcodec/loco.c @@ -161,6 +161,8 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh for (j = 1; j < height; j++) { /* restore left column */ val = loco_get_rice(&rc); + if (val == INT_MIN) + return AVERROR_INVALIDDATA; data[0] = data[-stride] + val; /* restore all other pixels */ for (i = 1; i < width; i++) { |