Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@quiye
Copy link
Contributor

@quiye quiye commented Oct 12, 2020

Fixes #2154

The 32-bit version of ParseInt makes it easy to verify if milestoneString is a 32-bit integer or not.

If the input number is valid for int32, it will be used as an intergar milestone.
Prior to this patch, int64 was used for integer validation.

$ make
$ DEBUG=api ./bin/gh issue list -m 2147483647 2>&1 | grep '"number"'
        "number": 2147483647,
$ DEBUG=api ./bin/gh issue list -m 2147483648 2>&1 | grep '"number"'
$ 

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Thank you for the fix

@samcoe samcoe merged commit 869f511 into cli:trunk Oct 20, 2020
@quiye quiye deleted the milestone-int32-validation branch October 24, 2020 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integer overflow occured at gh issue list --milestone

3 participants