Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-11-04 03:19:19 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2018-01-09 01:19:14 +0300
commit8b8502a66f00a0e2ae186d1edd3eeb2ef1eb6bd3 (patch)
treedefaed67c53aad971393a2c76a91de046c0def26
parentd6ecc61db8eabb24d5fa51619d84a1483cef5c8d (diff)
avcodec/exr: fix undefined shift in pxr24_uncompress()
Fixes: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' Fixes: 3787/clusterfuzz-testcase-minimized-5728764920070144 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 66f0c958bfd5475658b432d1af4d2e174b2dfcda) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/exr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 47d30fa804..4b0cf21cdb 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -864,7 +864,7 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src,
in = ptr[2] + td->xsize;
for (j = 0; j < td->xsize; ++j) {
- uint32_t diff = (*(ptr[0]++) << 24) |
+ uint32_t diff = ((unsigned)*(ptr[0]++) << 24) |
(*(ptr[1]++) << 16) |
(*(ptr[2]++) << 8);
pixel += diff;