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

Ensure that for builtin types, attribute index is non-negative #236

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Ensure that for builtin types, attribute index is non-negative #236

merged 1 commit into from
Nov 27, 2023

Conversation

zeux
Copy link
Contributor

@zeux zeux commented Oct 28, 2023

glTF specification guarantees that the indices of builtin attributes are natural numbers; atoi can return a negative number, which is likely to cause problems for client code (for example, even if it attempts to range-check the texture coordinate index before writing it to internal mesh representation, index < 8 will not work because index can be negative).

glTF specification guarantees that the indices of builtin attributes are
natural numbers; atoi can return a negative number, which is likely to
cause problems for client code (for example, even if it attempts to
range-check the texture coordinate index before writing it to internal
mesh representation, index < 8 will not work because index can be
negative).
@zeux
Copy link
Contributor Author

zeux commented Oct 29, 2023

(I think this is going to be the last validation PR for a few months; there are still some alignment issues visible under UBSAN left but they aren't super critical to fix)

@jkuhlmann jkuhlmann merged commit b164248 into jkuhlmann:master Nov 27, 2023
3 checks passed
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.

2 participants