summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2015-02-10 00:37:41 +0200
committerOleg Oshmyan <chortos@inbox.lv>2015-02-10 04:42:59 +0200
commit5c60a78f2ebdca81f590707f48cf07420292044b (patch)
treeca104989675980e99258cedcbed4a6d3c184c635 /libass
parent6a07f564857d02d55b3549380ce033f532c14efc (diff)
downloadlibass-5c60a78f2ebdca81f590707f48cf07420292044b.tar.bz2
libass-5c60a78f2ebdca81f590707f48cf07420292044b.tar.xz
Make sure the synth tmp buffer is large enough for be_blur
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_bitmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libass/ass_bitmap.c b/libass/ass_bitmap.c
index 609404f..d1ba819 100644
--- a/libass/ass_bitmap.c
+++ b/libass/ass_bitmap.c
@@ -126,7 +126,8 @@ static bool resize_tmp(ASS_SynthPriv *priv, int w, int h)
{
if (w >= INT_MAX || (w + 1) > SIZE_MAX / 2 / sizeof(unsigned) / FFMAX(h, 1))
return false;
- size_t needed = sizeof(unsigned) * (w + 1) * h;
+ size_t needed = FFMAX(sizeof(unsigned) * (w + 1) * h,
+ sizeof(uint16_t) * ass_align(32, w) * 2);
if (priv->tmp && priv->tmp_allocated >= needed)
return true;