aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-18 22:15:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-18 22:15:32 +0100
commitcb079b1b2bb1f7d0609ea7196090802a2788913a (patch)
tree4ab22de87f73eb6882f8318672005dd3902b601b
parent03a5c44faeceaf058ffe43c14d7d1a0d7c12da4c (diff)
downloadffmpeg-cb079b1b2bb1f7d0609ea7196090802a2788913a.tar.gz
avcodec/pngdec: fix signed overflow
fixes fate ftrapv failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/pngdec.c2
1 files changed, 1 insertions, 1 deletions
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;
}