summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-20 12:11:52 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-07-20 12:11:52 (GMT)
commitabfc4d838aed12ca650cf764fc7ac2ae1d778036 (patch)
treebf6e884b51114ed29fc5b963df93bc4258d6864f /Modules
parente91ad501c55184f375518f058b6e0625d47de0b1 (diff)
downloadcpython-abfc4d838aed12ca650cf764fc7ac2ae1d778036.zip
cpython-abfc4d838aed12ca650cf764fc7ac2ae1d778036.tar.gz
cpython-abfc4d838aed12ca650cf764fc7ac2ae1d778036.tar.bz2
Fix fishy sizeof(Py_ssize_t *).
sizeof(Py_ssize_t *) == sizeof(Py_ssize_t) but it's not a portable assumption. CID 486403
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index c195694..62a083b 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -1326,7 +1326,7 @@ PyCArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (stgdict->format == NULL)
goto error;
stgdict->ndim = itemdict->ndim + 1;
- stgdict->shape = PyMem_Malloc(sizeof(Py_ssize_t *) * stgdict->ndim);
+ stgdict->shape = PyMem_Malloc(sizeof(Py_ssize_t) * stgdict->ndim);
if (stgdict->shape == NULL)
goto error;
stgdict->shape[0] = length;