[FFmpeg-cvslog] swscale/output: fix signed integer overflow for ya16

Paul B Mahol git at videolan.org
Thu Sep 26 16:57:52 EEST 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Sep 26 15:55:03 2019 +0200| [21838cad2fc44023ad85e35d5c677e2f8d29a0ef] | committer: Paul B Mahol

swscale/output: fix signed integer overflow for ya16

Fixes #7666.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21838cad2fc44023ad85e35d5c677e2f8d29a0ef
---

 libswscale/output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index 7eb4644ce6..0e20a0a6b8 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -904,7 +904,7 @@ yuv2ya16_X_c_template(SwsContext *c, const int16_t *lumFilter,
 
     for (i = 0; i < dstW; i++) {
         int j;
-        int Y = 1 << 18;
+        int64_t Y = 1 << 18;
         int64_t A = 0xffff<<14;
 
         for (j = 0; j < lumFilterSize; j++)



More information about the ffmpeg-cvslog mailing list