diff options
author | Rodger Combs <rodger.combs@gmail.com> | 2014-07-19 00:17:41 -0500 |
---|---|---|
committer | Rodger Combs <rodger.combs@gmail.com> | 2014-07-19 00:17:41 -0500 |
commit | 079769c5717278971ba9115cbf074434574dfc75 (patch) | |
tree | e536398bc07382e8f4d7ffdd84b9c1c610889b73 | |
parent | 3dc25e3fc94e31981dd1c6a1337a7619d517a828 (diff) | |
parent | ee94375e1d4c5d977e5e9c4ad5cba9a7f8e2d078 (diff) | |
download | libass-079769c5717278971ba9115cbf074434574dfc75.tar.bz2 libass-079769c5717278971ba9115cbf074434574dfc75.tar.xz |
Merge pull request #119 from MrSmile/fix-drawing-overflow
Fix integer overflow in FT_Outline
-rw-r--r-- | libass/ass_drawing.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libass/ass_drawing.c b/libass/ass_drawing.c index 7837e27..fec9de2 100644 --- a/libass/ass_drawing.c +++ b/libass/ass_drawing.c @@ -36,6 +36,8 @@ static inline void drawing_add_point(ASS_Drawing *drawing, FT_Vector *point) { FT_Outline *ol = &drawing->outline; + if (ol->n_points == SHRT_MAX) + return; if (ol->n_points >= drawing->max_points) { drawing->max_points *= 2; @@ -56,6 +58,8 @@ static inline void drawing_add_point(ASS_Drawing *drawing, static inline void drawing_close_shape(ASS_Drawing *drawing) { FT_Outline *ol = &drawing->outline; + if (ol->n_contours == SHRT_MAX) + return; if (ol->n_contours >= drawing->max_contours) { drawing->max_contours *= 2; |