diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-06-30 06:05:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-30 06:05:23 +0200 |
commit | 6b25f35f84960ddb7fbfc3b4df3f244e42bb4470 (patch) | |
tree | e7408959f9dd586159e3481120fa047f9c377b44 /media/libwebp/utils/rescaler_utils.c | |
parent | b5b0b28441642f1c15b6ca0834bfca068bcbb154 (diff) | |
parent | 53407e7bf2d8a1a27efef4f15ec8032014273803 (diff) | |
download | UXP-6b25f35f84960ddb7fbfc3b4df3f244e42bb4470.tar UXP-6b25f35f84960ddb7fbfc3b4df3f244e42bb4470.tar.gz UXP-6b25f35f84960ddb7fbfc3b4df3f244e42bb4470.tar.lz UXP-6b25f35f84960ddb7fbfc3b4df3f244e42bb4470.tar.xz UXP-6b25f35f84960ddb7fbfc3b4df3f244e42bb4470.zip |
Merge pull request #566 from JustOff/PR_libwebp-1.0.0
Update libwebp to v1.0.0 + known security patches
Diffstat (limited to 'media/libwebp/utils/rescaler_utils.c')
-rw-r--r-- | media/libwebp/utils/rescaler_utils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/media/libwebp/utils/rescaler_utils.c b/media/libwebp/utils/rescaler_utils.c index 0d1f80da2..6e384f507 100644 --- a/media/libwebp/utils/rescaler_utils.c +++ b/media/libwebp/utils/rescaler_utils.c @@ -15,7 +15,7 @@ #include <stdlib.h> #include <string.h> #include "../dsp/dsp.h" -#include "./rescaler_utils.h" +#include "../utils/rescaler_utils.h" //------------------------------------------------------------------------------ @@ -85,11 +85,13 @@ int WebPRescalerGetScaledDimensions(int src_width, int src_height, // if width is unspecified, scale original proportionally to height ratio. if (width == 0) { - width = (src_width * height + src_height / 2) / src_height; + width = + (int)(((uint64_t)src_width * height + src_height / 2) / src_height); } // if height is unspecified, scale original proportionally to width ratio. if (height == 0) { - height = (src_height * width + src_width / 2) / src_width; + height = + (int)(((uint64_t)src_height * width + src_width / 2) / src_width); } // Check if the overall dimensions still make sense. if (width <= 0 || height <= 0) { |