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
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);
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);