Skip to content

Undefined behaviour in text.c #18

@poldy

Description

@poldy

This is just a small issue. When I used the "-fsanitize=undefined" option to clang, it complained that performing arithmetic on a NULL pointer is undefined behaviour at L49 of text.c. The problem is that current->avail is NULL at initialisation time, so the addition is undefined (nasal daemons, etc. :-) ). This patch fixes the warning.

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