]> granicus.if.org Git - libass/commitdiff
Clip vector blending: do not copy last row padding
authorGrigori Goronzy <greg@hein>
Thu, 20 Aug 2009 14:41:11 +0000 (16:41 +0200)
committerGrigori Goronzy <greg@hein>
Thu, 20 Aug 2009 14:41:11 +0000 (16:41 +0200)
Do not copy the padding on the last row into the new buffer since we
cannot rely on the padding actually existing; might fix a segfault in
some obscure cases.

libass/ass_render.c

index 253d409384a2ca3b3149f65f0b5df3008e642c3e..bcb3f95d5f135b1c96953345ec4a8d26ac76dc43 100644 (file)
@@ -592,7 +592,7 @@ static void blend_vector_clip(ASS_Renderer *render_priv,
             free_list_add(render_priv, nbuffer);
 
             // Blend together
-            memcpy(nbuffer, abuffer, as * ah);
+            memcpy(nbuffer, abuffer, as * (ah - 1) + aw);
             for (y = 0; y < h; y++)
                 for (x = 0; x < w; x++) {
                     apos = (atop + y) * as + aleft + x;