Skip to content

Missing null checks #361

Closed
Closed
@roblabla

Description

@roblabla

In the core-foundation crate, there appears to be a lot of functions missing NULL checks in the allocation, potentially causing segfaults when trying to over-allocate (instead of panicking or returning a Result). Examples include dictionary creation, array creation or string creation. Those functions can all return NULL according to Apple's documentation (e.g. see return value doc here

It would seem wise to add some railguards against this somewhere - perhaps wrap_under_create_rule should have an explicit NULL-check, causing a panic if it is encountered?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions