summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2017-01-08 16:37:56 +0100
committerMichael Niedermayer <[email protected]>2017-05-17 20:35:19 +0200
commitcc4a13b8a7d8bfad6fa4f6cf051066e51434b72f (patch)
tree74f2c486ee0479b3cf8fb5e19730e6f76a3773d9
parent0a13449b2806893a8521fabad6b149c81d68dd2f (diff)
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 <[email protected]> (cherry picked from commit f48b6b8b91d63148ef50d096688ed7226cd6ddf4) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavcodec/tiff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 3bc31a4545..af433d9a4e 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -408,7 +408,7 @@ static int tiff_unpack_lzma(TiffContext *s, AVFrame *p, uint8_t *dst, int stride
const uint8_t *src, int size, int width, int lines,
int strip_start, int is_yuv)
{
- uint64_t outlen = width * lines;
+ uint64_t outlen = width * (uint64_t)lines;
int ret, line;
uint8_t *buf = av_malloc(outlen);
if (!buf)