Compositor: Fix heap overflow when copying previews
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 27 Mar 2015 12:38:10 +0000 (17:38 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 27 Mar 2015 13:23:32 +0000 (18:23 +0500)
source/blender/blenkernel/intern/node.c

index c7010e42aacb783b88849d1ea2395f97a08b7f30..ac79e13ac835f5f95a2eb9738535dd6453f23c5d 100644 (file)
@@ -1418,7 +1418,7 @@ static void node_preview_sync(bNodePreview *to, bNodePreview *from)
        if (to->rect && from->rect) {
                int xsize = to->xsize;
                int ysize = to->ysize;
-               memcpy(to->rect, from->rect, 4 * xsize + xsize * ysize * sizeof(char) * 4);
+               memcpy(to->rect, from->rect, xsize * ysize * sizeof(char) * 4);
        }
 }