summaryrefslogtreecommitdiffstats
path: root/libass/ass_bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'libass/ass_bitmap.c')
-rw-r--r--libass/ass_bitmap.c2
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;