Four calls to PyArray_Ravel in init_iter_all / the ravel-based init paths (iterators.h:133-146) store the result without checking for NULL. If PyArray_Ravel fails, PyArray_DIM(NULL, 0) dereferences NULL. The old a reference is also leaked (same pattern as the nonreducer_axis Ravel leak in #521).
These functions return void, so the fix requires either refactoring to return an error indicator or having callers check after init_iter_all.
File(s): iterators.h:133-135, 144-146
See #518 for the complete report.
Found using cext-review-toolkit.
Four calls to
PyArray_Ravelininit_iter_all/ the ravel-based init paths (iterators.h:133-146) store the result without checking for NULL. IfPyArray_Ravelfails,PyArray_DIM(NULL, 0)dereferences NULL. The oldareference is also leaked (same pattern as thenonreducer_axisRavel leak in #521).These functions return
void, so the fix requires either refactoring to return an error indicator or having callers check afterinit_iter_all.File(s):
iterators.h:133-135, 144-146See #518 for the complete report.
Found using cext-review-toolkit.