diff options
author | wm4 <wm4@nowhere> | 2014-11-16 17:23:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-16 17:23:39 +0100 |
commit | 52ec0bab2f2b2027daa0415124d08e9898c5529a (patch) | |
tree | 967f43da76160ff45070c09b8522908e54b7c996 | |
parent | 045f646ab3b076002aef5e24b3e51713f40492cc (diff) | |
download | libass-52ec0bab2f2b2027daa0415124d08e9898c5529a.tar.bz2 libass-52ec0bab2f2b2027daa0415124d08e9898c5529a.tar.xz |
Check the overflow check for overflows
Seriously...
Checking for negative values might not be needed, but do it anyway.
-rw-r--r-- | libass/ass_bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_bitmap.c b/libass/ass_bitmap.c index 2c523b4..97e93a0 100644 --- a/libass/ass_bitmap.c +++ b/libass/ass_bitmap.c @@ -302,7 +302,7 @@ Bitmap *outline_to_bitmap(ASS_Renderer *render_priv, int w = x_max - x_min; int h = y_max - y_min; - if (w * h > 8000000) { + if (w < 0 || h < 0 || w > 8000000 / FFMAX(h, 1)) { ass_msg(render_priv->library, MSGL_WARN, "Glyph bounding box too large: %dx%dpx", w, h); return NULL; |