Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always parse a string fixed64 string to a int64 even on 32 bits platform #152

Merged
merged 1 commit into from
May 3, 2018

Conversation

rosbo
Copy link
Contributor

@rosbo rosbo commented May 3, 2018

strconv.Atoi returns the result of ParseInt(s, 10, 0). The last parameter is the bitSize. When bitSize is 0, it uses the default platform number of bits(32 for 32bits architecture) and crashes when parsing.


[all]

[terraform]

Always parse a string int64 with 64bits even on 32bits platform

[puppet]

[puppet-dns]

[puppet-sql]

[puppet-compute]

[chef]

@rosbo rosbo added the terraform label May 3, 2018
@rosbo rosbo requested a review from nat-henderson May 3, 2018 20:10
@rosbo rosbo changed the title Always parse a string int64 with 64bits even on 32bits platform Always parse a string fixed64 string to a int64 even on 32 bits platform May 3, 2018
@rosbo rosbo force-pushed the int64-overflow branch from b063265 to 86a6512 Compare May 3, 2018 21:29

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@rosbo rosbo force-pushed the int64-overflow branch from 86a6512 to d518733 Compare May 3, 2018 21:42
@rosbo
Copy link
Contributor Author

rosbo commented May 3, 2018

Downstream PRs:
hashicorp/terraform-provider-google#1429

@rosbo rosbo merged commit ac82a40 into master May 3, 2018
@rosbo rosbo deleted the int64-overflow branch May 3, 2018 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant