diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-06-09 22:14:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-05 12:43:08 +0200 |
commit | 5663dd666233ffc8b2b28a992433694196f2d46d (patch) | |
tree | 62b0c2e44293e80d00cc2757247b535c2c3fd291 | |
parent | f46d3383413e004977c46032bd6e2295b8d2fa61 (diff) | |
download | ffmpeg-5663dd666233ffc8b2b28a992433694196f2d46d.tar.gz |
avcodec/loco: Fix signed integer overflow in loco_get_rice()
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 22975/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5658160970072064
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 aa88cdfd90f5da0683cd6556c75a5ba5740a1c27)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/loco.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/loco.c b/libavcodec/loco.c index e3746c8317..e22d280b96 100644 --- a/libavcodec/loco.c +++ b/libavcodec/loco.c @@ -82,7 +82,7 @@ static inline void loco_update_rice_param(RICEContext *r, int val) static inline int loco_get_rice(RICEContext *r) { - int v; + unsigned v; if (r->run > 0) { /* we have zero run */ r->run--; loco_update_rice_param(r, 0); |