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

bug(parseutil): SafeParseIntSlice leading zeros #40

Merged
merged 1 commit into from Jun 2, 2022

Conversation

cipherboy
Copy link
Contributor

Due to creating a slice with the specified number of elements (rather
than a capacity hint), SafeParseIntSlice returned a slice with leading
zeros of length greater than was passed, rather than the correct value.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>


Of course, the one function I didn't test has the bug... Thanks to @Gabrielopesantos in hashicorp/vault#15561 for catching this!

@sgmiller We'll need to bump this in Vault on both 1.12.x and 1.11.x.

Due to creating a slice with the specified number of elements (rather
than a capacity hint), SafeParseIntSlice returned a slice with leading
zeros of length greater than was passed, rather than the correct value.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
@cipherboy cipherboy added the bug Something isn't working label May 31, 2022
@cipherboy cipherboy requested a review from sgmiller May 31, 2022 13:18
@sgmiller
Copy link

1.12.x will happen naturally, but make sure to create a PR to update the deps for 1.11.

@sgmiller sgmiller merged commit 43c607d into hashicorp:main Jun 2, 2022
cipherboy added a commit to hashicorp/vault that referenced this pull request Jun 2, 2022
Note that this only really applies to the SSH engine, nothing else uses
this helper. Other go.mod's updated for consistency.

See also: hashicorp/go-secure-stdlib#40

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
cipherboy added a commit to hashicorp/vault that referenced this pull request Jun 2, 2022
Note that this only really applies to the SSH engine, nothing else uses
this helper. Other go.mod's updated for consistency.

See also: hashicorp/go-secure-stdlib#40

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Gabrielopesantos pushed a commit to Gabrielopesantos/vault that referenced this pull request Jun 6, 2022
Note that this only really applies to the SSH engine, nothing else uses
this helper. Other go.mod's updated for consistency.

See also: hashicorp/go-secure-stdlib#40

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants