Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory access out of bounds in numpy + chrome 89 #1474

Merged
merged 23 commits into from
Apr 17, 2021
Merged
Prev Previous commit
Next Next commit
Fix reference errors
  • Loading branch information
Hood committed Apr 16, 2021
commit d7caf6cbaf62f934df3f31ace627a148618a87ee
6 changes: 3 additions & 3 deletions src/core/PyArray_Broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ EM_JS_NUM(int, PyArray_Broadcast_part1, (void* mit), {
// nd = PyArray_MAX(nd, PyArray_NDIM(mit->iters[i]->ao));
let it = HEAP32[(mit + 152 + 4 * i) / 4];
// Look up ao
let it_ao = HEAP32[(res + 660) / 4];
let it_ao = HEAP32[(it + 660) / 4];
// look up NDIM
let it_ao_ndim = HEAP32[(res + 12) / 4];
nd = (res > nd) ? res : nd;
let it_ao_ndim = HEAP32[(it_ao + 12) / 4];
nd = (it_ao_ndim > nd) ? it_ao_ndim : nd;
}
// mit->nd = nd;
HEAP32[(mit + 20) / 4] = nd;
Expand Down