Compositor: Fix heap overflow when copying previews

This commit is contained in:
Sergey Sharybin 2015-03-27 17:38:10 +05:00
parent 8af5390968
commit da170d9dc3

@ -1418,7 +1418,7 @@ static void node_preview_sync(bNodePreview *to, bNodePreview *from)
if (to->rect && from->rect) { if (to->rect && from->rect) {
int xsize = to->xsize; int xsize = to->xsize;
int ysize = to->ysize; 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);
} }
} }