diff options
| author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-05-04 09:01:08 +0200 |
|---|---|---|
| committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-13 09:36:57 -0700 |
| commit | 96fd8ba3f51c6fe7ecfc797c4c33d7ae4dc2821a (patch) | |
| tree | d2d5b2017c80ddb64751174cd38f2e7dd75a907a /numpy | |
| parent | a5bf28b0167356098e6ed1ad69e3bc232dac7a26 (diff) | |
| download | numpy-96fd8ba3f51c6fe7ecfc797c4c33d7ae4dc2821a.tar.gz | |
BUG: Fix invalid access due to `iter` already being cleaned up
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/src/multiarray/mapping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c index 2f3b2795f..d378dc8e5 100644 --- a/numpy/core/src/multiarray/mapping.c +++ b/numpy/core/src/multiarray/mapping.c @@ -1192,7 +1192,7 @@ array_assign_boolean_subscript(PyArrayObject *self, NPY_BEGIN_THREADS_NDITER(iter); } if (!(flags & NPY_METH_NO_FLOATINGPOINT_ERRORS)) { - npy_clear_floatstatus_barrier((char *)iter); + npy_clear_floatstatus_barrier((char *)self); } npy_intp strides[2] = {v_stride, self_stride}; @@ -1233,7 +1233,7 @@ array_assign_boolean_subscript(PyArrayObject *self, res = -1; } if (res == 0 && !(flags & NPY_METH_NO_FLOATINGPOINT_ERRORS)) { - int fpes = npy_get_floatstatus_barrier((char*)iter); + int fpes = npy_get_floatstatus_barrier((char *)self); if (fpes && PyUFunc_GiveFloatingpointErrors("cast", fpes) < 0) { return -1; } |
