Browse code

avcodec/tiff: Perform multiply in tiff_unpack_lzma() as 64bit

This should make no difference as the value should not be able to be that large
but its more correct this way

Fixes CID1348138

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Michael Niedermayer authored on 2017/01/09 00:37:56
Showing 1 changed files
... ...
@@ -408,7 +408,7 @@ static int tiff_unpack_lzma(TiffContext *s, AVFrame *p, uint8_t *dst, int stride
408 408
                             const uint8_t *src, int size, int width, int lines,
409 409
                             int strip_start, int is_yuv)
410 410
 {
411
-    uint64_t outlen = width * lines;
411
+    uint64_t outlen = width * (uint64_t)lines;
412 412
     int ret, line;
413 413
     uint8_t *buf = av_malloc(outlen);
414 414
     if (!buf)