Skip to content

farver segfault #31

@pmur002

Description

@pmur002

farver::encode_colour() needs to check for "empty" inputs (e.g., zero-row matrix or zero-length alpha) because C level encode_c() accesses, for example, REAL(alpha)[0] without checking.

Example that segfaults on one of my OS-R-version combinations (on other combinations I think it is just getting lucky):

farver::encode_colour(matrix(numeric(0), ncol=3), numeric(0))

Same comment applies to farver::decode_colour() presumably.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions