diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2015-02-10 00:37:41 +0200 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2015-02-10 04:42:59 +0200 |
commit | 5c60a78f2ebdca81f590707f48cf07420292044b (patch) | |
tree | ca104989675980e99258cedcbed4a6d3c184c635 | |
parent | 6a07f564857d02d55b3549380ce033f532c14efc (diff) | |
download | libass-5c60a78f2ebdca81f590707f48cf07420292044b.tar.bz2 libass-5c60a78f2ebdca81f590707f48cf07420292044b.tar.xz |
Make sure the synth tmp buffer is large enough for be_blur
-rw-r--r-- | libass/ass_bitmap.c | 3 |
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; |