Skip to content

quaddtype: potential dereferencing bug in casts.cpp #23

@WarrenWeckesser

Description

@WarrenWeckesser

In this code

https://github.com/numpy/numpy-user-dtypes/blob/2134a7d2a15946536d2f1d5c33ad8896d5bea2d8/quaddtype/numpy_quaddtype/src/casts.cpp#L34-L43

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions