diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-19 03:36:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-19 03:36:42 +0200 |
commit | d50aa006fb3430bedc3872ba10e028a714499625 (patch) | |
tree | 9f3e8076138af115d5d55ea96d66acf06ee9fc7a /libavcodec | |
parent | a06f943f9d65a2e80536ee9e99d86e855c8ca8da (diff) | |
download | ffmpeg-d50aa006fb3430bedc3872ba10e028a714499625.tar.gz |
tiffenc: fix integer overflow
Fixes CID700699
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/tiffenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index c675c55f71..dae9147e4e 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -137,11 +137,11 @@ static void add_entry(TiffEncoderContext * s, bytestream_put_le16(&entries_ptr, type); bytestream_put_le32(&entries_ptr, count); - if (type_sizes[type] * count <= 4) { + if (type_sizes[type] * (int64_t)count <= 4) { tnput(&entries_ptr, count, ptr_val, type, 0); } else { bytestream_put_le32(&entries_ptr, *s->buf - s->buf_start); - check_size(s, count * type_sizes2[type]); + check_size(s, count * (int64_t)type_sizes2[type]); tnput(s->buf, count, ptr_val, type, 0); } |