Skip to content

isEmpty() dereferences pointer before checking if it is NULL. #153

@jpuderer

Description

@jpuderer

if (',' != *pStart && '*' != *pStart && pStart != NULL)

I'm getting a crash in this library. I don't know if this is the root cause, but the logic in isEmpty is backwards.

The NULL check needs to happen before dereferencing the pointer.

Should be...
if (pStart != NULL && ',' != *pStart && '*' != *pStart)

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