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

ua: ensure variant array dimensions are greater than zero #363

Merged
merged 2 commits into from
Aug 16, 2020

Conversation

ceh
Copy link
Contributor

@ceh ceh commented Aug 15, 2020

According to the reference, all dimensions shall be specified and shall be greater than zero. So if any dimension is less than 1, return an error.

Fixes #362, because it will ensure that the code bails before trying to split a multi-dimensional array.

What do you think @magiconair?

ceh added 2 commits August 15, 2020 21:31
All dimensions shall be specified and shall be greater than zero.
@magiconair
Copy link
Member

Where is this in the reference? I can only see that the values need to be greater than zero.

Independent of this i think this makes sense and the change LGTM.

image

@magiconair
Copy link
Member

Nvm. I didn't look at the right spot.

Thank you.

@magiconair magiconair merged commit d9a5272 into gopcua:master Aug 16, 2020
@ceh ceh deleted the ceh-variant-fuzz branch August 21, 2020 10:13
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.

ua/variant: index out of range
2 participants