diff options
author | Dr.Smile <vabnick@gmail.com> | 2015-06-14 18:55:41 +0300 |
---|---|---|
committer | Dr.Smile <vabnick@gmail.com> | 2015-06-14 18:55:41 +0300 |
commit | 678f1f6b448181d9ccb9b920d91847f40a4d82ef (patch) | |
tree | 2e02b0ea64f7c7083d7dfe1a2042c50b196f9fe1 /libass | |
parent | 547850d9c0250ea730603c522f78c44b6b1049f1 (diff) | |
download | libass-678f1f6b448181d9ccb9b920d91847f40a4d82ef.tar.bz2 libass-678f1f6b448181d9ccb9b920d91847f40a4d82ef.tar.xz |
Fix crash when stroked outline overflows SHRT_MAX
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_render.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index c873330..2cfa62a 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1102,7 +1102,7 @@ static void stroke_outline(ASS_Renderer *render_priv, ASS_Outline *outline, outline->n_points = n_points; outline->n_contours = n_contours; for (size_t i = 0; i < n_contours; ++i) - outline->contours[i] = contours[i]; + outline->contours[i] = (unsigned short) contours[i]; // "Stroke" with the outline emboldener (in two passes if needed). // The outlines look uglier, but the emboldening never adds any points |