summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2017-02-11 19:19:31 -0600
committerRodger Combs <rodger.combs@gmail.com>2017-02-14 18:55:03 -0600
commitaa7aa03609fa6ab6f3a51b6f6a8d9e2dfa509ad2 (patch)
treea486a7f7cc7ca26a1b95a0027115671dce90ae40 /libass
parent1be7dc0bdcf4ef44786bfc84c6307e6d47530a42 (diff)
downloadlibass-aa7aa03609fa6ab6f3a51b6f6a8d9e2dfa509ad2.tar.bz2
libass-aa7aa03609fa6ab6f3a51b6f6a8d9e2dfa509ad2.tar.xz
Remove arbitrary bitmap size limit
We're not aware of any specific reason for this number to be used, and actual potentially-dangerous cases should be handled by the other limits. Fixes #260
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_bitmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libass/ass_bitmap.c b/libass/ass_bitmap.c
index e46ef0a..ff2eac4 100644
--- a/libass/ass_bitmap.c
+++ b/libass/ass_bitmap.c
@@ -219,7 +219,7 @@ Bitmap *outline_to_bitmap(ASS_Renderer *render_priv,
int mask = (1 << render_priv->engine->tile_order) - 1;
- if (w < 0 || h < 0 || w > 8000000 / FFMAX(h, 1) ||
+ if (w < 0 || h < 0 ||
w > INT_MAX - (2 * bord + mask) || h > INT_MAX - (2 * bord + mask)) {
ass_msg(render_priv->library, MSGL_WARN, "Glyph bounding box too large: %dx%dpx",
w, h);
@@ -280,7 +280,7 @@ static Bitmap *outline_to_bitmap_ft(ASS_Renderer *render_priv,
bbox.xMin >>= 6;
bbox.yMax >>= 6;
- if (w < 0 || h < 0 || w > 8000000 / FFMAX(h, 1) ||
+ if (w < 0 || h < 0 ||
w > INT_MAX - 2 * bord || h > INT_MAX - 2 * bord) {
ass_msg(render_priv->library, MSGL_WARN, "Glyph bounding box too large: %dx%dpx",
w, h);