Skip to content

Commit

Permalink
BUG: Closes #5313 PyArray_AsCArray caused segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
hensing committed Nov 30, 2014
1 parent d44b9c6 commit a4163c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy/core/src/multiarray/multiarraymodule.c
Expand Up @@ -220,7 +220,7 @@ PyArray_AsCArray(PyObject **op, void *ptr, npy_intp *dims, int nd,
goto fail;
}
for (i = 0; i < n; i++) {
ptr3[i] = ptr3[n + (m-1)*i];
ptr3[i] = (char **) &ptr3[n + m * i];
for (j = 0; j < m; j++) {
ptr3[i][j] = PyArray_BYTES(ap) + i*PyArray_STRIDES(ap)[0] + j*PyArray_STRIDES(ap)[1];
}
Expand Down

0 comments on commit a4163c4

Please sign in to comment.