diff options
author | Julian Eisel <julian@blender.org> | 2020-08-06 15:12:23 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-08-06 15:12:23 +0300 |
commit | cb294c3a01bd82907c87549f7a09184369104925 (patch) | |
tree | 1fb375af455cc74a8a86965ae5e0cb3b0322ab95 | |
parent | 8f34bf5ebbbf1b25833be8c395d7c26a0a9fe3db (diff) |
Fix buffer-overflow when drawing Curve Guide objects
Was passing an array of length 3 to `where_on_path()` that expected
length 4.
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_extra.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c index 1e766b3cc39..60e622ca706 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.c +++ b/source/blender/draw/engines/overlay/overlay_extra.c @@ -545,7 +545,7 @@ static void OVERLAY_forcefield(OVERLAY_ExtraCallBuffers *cb, Object *ob, ViewLay if (cu && (cu->flag & CU_PATH) && ob->runtime.curve_cache->path && ob->runtime.curve_cache->path->data) { instdata.size_x = instdata.size_y = instdata.size_z = pd->f_strength; - float pos[3], tmp[3]; + float pos[4], tmp[3]; where_on_path(ob, 0.0f, pos, tmp, NULL, NULL, NULL); copy_v3_v3(instdata.pos, ob->obmat[3]); translate_m4(instdata.mat, pos[0], pos[1], pos[2]); |