diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-19 18:44:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-19 18:57:57 +0200 |
commit | 0fa26bd4703cf8ee84ae9b9859be2b4e0e77d42f (patch) | |
tree | d4c4bfe2c0f4fecff81a5e623ea35f2758f18d1d /libavcodec/utvideoenc.c | |
parent | d86ef54476b3775bb751f9fcc739a79b5aab428a (diff) | |
download | ffmpeg-0fa26bd4703cf8ee84ae9b9859be2b4e0e77d42f.tar.gz |
utvideoenc: fix theoretical integer overflow
The image sizes needed for this overflow to happen are currently not
supported in lavc, thus this should have no effect execpt making the
code more robust in light of future changes.
Fixes CID732245
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utvideoenc.c')
-rw-r--r-- | libavcodec/utvideoenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index 14d301ea8d..7167278351 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -417,7 +417,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src, /* If non-zero count is found, see if it matches width * height */ if (counts[symbol]) { /* Special case if only one symbol was used */ - if (counts[symbol] == width * height) { + if (counts[symbol] == width * (int64_t)height) { /* * Write a zero for the single symbol * used in the plane, else 0xFF. |