Commit cb079b1b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/pngdec: fix signed overflow

fixes fate ftrapv failure
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 03a5c44f
......@@ -226,7 +226,7 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
if (bpp == 4) {
p = *(int*)dst;
for (; i < size; i += bpp) {
int s = *(int*)(src + i);
unsigned s = *(int*)(src + i);
p = ((s & 0x7f7f7f7f) + (p & 0x7f7f7f7f)) ^ ((s ^ p) & 0x80808080);
*(int*)(dst + i) = p;
}
......
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