diff options
| author | Eric Wieser <wieser.eric@gmail.com> | 2017-12-11 20:30:44 -0800 |
|---|---|---|
| committer | Eric Wieser <wieser.eric@gmail.com> | 2017-12-11 20:30:44 -0800 |
| commit | 655ba9a968ba4f1419693c978b175fac8baee06e (patch) | |
| tree | 70b63eb8880d2332b5fccf28d6ba6755ac00d13b /numpy | |
| parent | f9aecaf5b1fc918cf6e898d1240336f7e2e8c743 (diff) | |
| download | numpy-655ba9a968ba4f1419693c978b175fac8baee06e.tar.gz | |
BUG: Fix exception without NULL return
Not tested, because PyArray_Arange is not use internally anywhere - although it is public API...
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/src/multiarray/ctors.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index e1989bab8..319e17a46 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -2966,6 +2966,7 @@ PyArray_Arange(double start, double stop, double step, int type_num) if (_safe_ceil_to_intp((stop - start)/step, &length)) { PyErr_SetString(PyExc_OverflowError, "arange: overflow while computing length"); + return NULL; } if (length <= 0) { |
