summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-16 17:30:02 +0100
committerwm4 <wm4@nowhere>2014-11-16 17:30:21 +0100
commit4349eaea54f96b058a2014bb77a5acdf66195965 (patch)
tree64aac712ed7184b195b95c3aa8defe0b006ad1be /libass
parent52ec0bab2f2b2027daa0415124d08e9898c5529a (diff)
downloadlibass-4349eaea54f96b058a2014bb77a5acdf66195965.tar.bz2
libass-4349eaea54f96b058a2014bb77a5acdf66195965.tar.xz
Deal with code-duplication bullshit
Much of outline_to_bitmap() is duplicated. What? Add the overflow check to duplicated code too.
Diffstat (limited to 'libass')
-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 97e93a0..658e2c7 100644
--- a/libass/ass_bitmap.c
+++ b/libass/ass_bitmap.c
@@ -367,7 +367,7 @@ Bitmap *outline_to_bitmap(ASS_Renderer *render_priv,
bbox.xMin >>= 6;
bbox.yMax >>= 6;
- 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;