From cb079b1b2bb1f7d0609ea7196090802a2788913a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 18 Dec 2013 22:15:32 +0100 Subject: [PATCH] avcodec/pngdec: fix signed overflow fixes fate ftrapv failure Signed-off-by: Michael Niedermayer --- libavcodec/pngdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 3d21e50288..516dd41f0c 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -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; }