Skip to content

Undefined behavior on INT_MIN #118

Description

@eyalroz

The library has undefined behavior in some cases, due to applying the unary negation operator indiscriminately. For example, when we print:

sprintf_(buffer, "%d", INT_MIN);

we internally have an int value variable with value INT_MIN, and then we take -value (or 0 - value). That's undefined! Not good.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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