diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-18 22:15:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-18 22:15:32 +0100 |
commit | cb079b1b2bb1f7d0609ea7196090802a2788913a (patch) | |
tree | 4ab22de87f73eb6882f8318672005dd3902b601b | |
parent | 03a5c44faeceaf058ffe43c14d7d1a0d7c12da4c (diff) | |
download | ffmpeg-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.c | 2 |
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; } |