diff options
author | Jacques Lucke <mail@jlucke.com> | 2018-10-24 11:57:16 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2018-10-24 11:57:46 +0300 |
commit | 341306995be6839fe091d23b511d89ad8deb616a (patch) | |
tree | 63c9481d99b1ebc21e430612dae779e5582983b1 /source | |
parent | 5af716620ad362dbb119dd1682b19ed230ba7201 (diff) |
Fix: buffer overflow when creating gpu.types.GPUIndexBuf
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/gpu/gpu_py_element.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/gpu/gpu_py_element.c b/source/blender/python/gpu/gpu_py_element.c index 10d6970e9e8..2462c222146 100644 --- a/source/blender/python/gpu/gpu_py_element.c +++ b/source/blender/python/gpu/gpu_py_element.c @@ -117,7 +117,7 @@ static PyObject *bpygpu_IndexBuf_new(PyTypeObject *UNUSED(type), PyObject *args, GPU_indexbuf_add_generic_vert(&builder, *buf); } #else - memcpy(builder.data, pybuffer.buf, index_len * sizeof(builder.data)); + memcpy(builder.data, pybuffer.buf, index_len * sizeof(*builder.data)); builder.index_len = index_len; #endif PyBuffer_Release(&pybuffer); |