Commit 8b0f9499 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 58aa0ed8
...@@ -881,7 +881,7 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src, ...@@ -881,7 +881,7 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src,
in = ptr[3] + s->xdelta; in = ptr[3] + s->xdelta;
for (j = 0; j < s->xdelta; ++j) { 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[1]++) << 16) |
(*(ptr[2]++) << 8 ) | (*(ptr[2]++) << 8 ) |
(*(ptr[3]++)); (*(ptr[3]++));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment