diff options
author | Michael Niedermayer <[email protected]> | 2020-06-13 11:21:52 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2020-06-14 22:02:34 +0200 |
commit | 335ddf2fe9bd4f67358c7ccf13c415cd7df7d955 (patch) | |
tree | d1292a54bb384c41b8fc8acfad410bcccf9dda21 | |
parent | 6514919306f2da851226c7cfa94f39424c55fdd9 (diff) |
avcodec/pixlet: Fix log(0) check
Fixes: passing zero to clz(), which is not a valid argument
Fixes: 23337/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PIXLET_fuzzer-5179131989065728
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit bd0f81526d3f4c23ecd0a399829103be2445c011)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavcodec/pixlet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c index 7b068b1ce5..78f571cd5f 100644 --- a/libavcodec/pixlet.c +++ b/libavcodec/pixlet.c @@ -221,7 +221,7 @@ static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst, length = 25 - nbits; while (i < size) { - if (state >> 8 != -3) + if (((state >> 8) + 3) & 0xFFFFFFF) value = ff_clz((state >> 8) + 3) ^ 0x1F; else value = -1; |