mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/pngdec: fix signed overflow
fixes fate ftrapv failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
03a5c44fae
commit
cb079b1b2b
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user