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

Avoid any potential out-of-bounds indexing in neasyf_type #6

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

ZedThree
Copy link
Member

@ZedThree ZedThree commented Apr 4, 2023

Allocate a local variable with the same type as the input, but with exactly one element. This way we can be sure we can index it correctly to call the scalar version.

This shouldn't be a problem now that we explicitly disallow zero-sized dimensions, but it's nice to be safe in case the user created the dimensions some other way.

Allocate a local variable with the same type as the input, but with
exactly one element. This way we can be sure we can index it correctly
to call the scalar version.

This shouldn't be a problem now that we explicitly disallow zero-sized
dimensions, but it's nice to be safe in case the user created the
dimensions some other way.
@ZedThree ZedThree merged commit af71a7c into main Apr 4, 2023
@ZedThree ZedThree deleted the bugfix/avoid-potential-out-of-bounds-index branch April 4, 2023 14:37
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.

None yet

1 participant