Skip to content

Commit c3ccd3c

Browse files
authored
Merge pull request #364 from IntelPython/fix/coverity-allocate-result-overrun
Fix Coverity OVERRUN false positive in _allocate_result
2 parents 25ceb1e + f205184 commit c3ccd3c

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
### Changed
1212

1313
### Fixed
14+
* Declared `f_ndim` as a C `int` in `_allocate_result` so the buffer size is computed in C rather than through a Python object, resolving a Coverity out-of-bounds (OVERRUN) false positive [gh-364](https://github.com/IntelPython/mkl_fft/pull/364)
1415

1516
## [2.3.2] - 2026-08-04
1617

mkl_fft/_pydfti.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ cdef cnp.ndarray _allocate_result(
302302
cdef cnp.npy_intp *f_shape
303303
cdef cnp.ndarray f_arr "ff_arrayObject"
304304
cdef int x_arr_is_fortran
305+
cdef int f_ndim
305306

306307
f_ndim = cnp.PyArray_NDIM(x_arr)
307308

0 commit comments

Comments
 (0)