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

reflect: ArrayOf allows negative length #43603

Open
mdempsky opened this issue Jan 9, 2021 · 4 comments
Open

reflect: ArrayOf allows negative length #43603

mdempsky opened this issue Jan 9, 2021 · 4 comments
Labels
Milestone

Comments

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Jan 9, 2021

This program should probably panic instead of printing [-100]uint8: https://play.golang.org/p/gnjsjBoKNvQ

/cc @griesemer @ianlancetaylor

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jan 9, 2021

I agree that this should panic.

@bcmills bcmills added the NeedsFix label Jan 11, 2021
@tpaschalis
Copy link
Contributor

@tpaschalis tpaschalis commented Jan 14, 2021

I'll take a stab if there's no objection!

@mdempsky
Copy link
Member Author

@mdempsky mdempsky commented Jan 14, 2021

@tpaschalis No objection. I think this should be a pretty straightforward issue to fix. Thanks.

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 15, 2021

Change https://golang.org/cl/284136 mentions this issue: reflect: panic if ArrayOf is called with negative count

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.