diff options
author | Michael Niedermayer | 2018-02-21 04:29:44 +0100 |
---|---|---|
committer | Michael Niedermayer | 2018-02-27 19:37:06 +0100 |
commit | 49062a90174b6e4104876c0257dc673a0da854ca (patch) | |
tree | 178919f573aa8f19fc4b349e5413d344680113cb | |
parent | 090c0abff9c8b27304614f15d9464dbf4ea59833 (diff) |
avcodec/exr: fix invalid shift in unpack_14()
Fixes: 6154/clusterfuzz-testcase-minimized-5762231061970944
Fixes: runtime error: shift exponent 63 is too large for 32-bit type 'int'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/exr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 444af17778..5253cc3f13 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -899,7 +899,7 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src, static void unpack_14(const uint8_t b[14], uint16_t s[16]) { - unsigned short shift = (b[ 2] >> 2); + unsigned short shift = (b[ 2] >> 2) & 15; unsigned short bias = (0x20 << shift); int i; |