diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-09-25 01:03:07 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-07-03 15:13:49 +0300 |
commit | 3eafbebe1188938baa2e6d8c4f6471285befb4b9 (patch) | |
tree | 03bc3eacf4c15a80ddac63da47c3204fed166bda | |
parent | 2b177a46d270b5c2be15770d458e18441ecedffc (diff) |
avcodec/exr: Fix undefined left shifts of negative numbers
Affected the FATE-tests exr-rgb-scanline-pxr24-half-uint32-13x9 and
exr-rgb-scanline-pxr24-uint32.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8b0f949906116c40b6f1e55a1bce4447ada3219c)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-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 2481959a21..1ba8074272 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -892,7 +892,7 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src, in = ptr[3] + s->xdelta; for (j = 0; j < s->xdelta; ++j) { - uint32_t diff = (*(ptr[0]++) << 24) | + uint32_t diff = ((uint32_t)*(ptr[0]++) << 24) | (*(ptr[1]++) << 16) | (*(ptr[2]++) << 8 ) | (*(ptr[3]++)); |