-
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
Description
In this code
numpy-user-dtypes/quaddtype/numpy_quaddtype/src/casts.cpp
Lines 34 to 43 in 2134a7d
| if (given_descrs[0]->backend != given_descrs[1]->backend) | |
| casting = NPY_UNSAFE_CASTING; | |
| Py_INCREF(given_descrs[0]); | |
| loop_descrs[0] = given_descrs[0]; | |
| if (given_descrs[1] == NULL) { | |
| Py_INCREF(given_descrs[0]); | |
| loop_descrs[1] = given_descrs[0]; | |
| } |
given_descrs[1] is dereferenced in line 34 (given_descrs[1]->backend), so it is assumed that given_descrs[1] is not NULL. In line 40, however, there is a check for given_descrs[1] == NULL. So either the check in line 40 always fails, or there is a bug in line 34.