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

Off by one error in resource name check #84

Open
antisvin opened this issue May 12, 2023 · 0 comments
Open

Off by one error in resource name check #84

antisvin opened this issue May 12, 2023 · 0 comments
Assignees

Comments

@antisvin
Copy link
Collaborator

Based on forum discussion: https://community.rebeltech.org/t/witch-error-0x60-invalid-save-name-quadsampler/2096

Resource name is QuadSampler.cfg, so 15 bytes + null byte

This can fit into 16 byte Resource::name field, but we demand strictly less than 16 bytes instead of <= 16.

We use strlcpy function to verify that resource name is null terminated, so extra checks due to this change are not necessary

@antisvin antisvin self-assigned this Jun 7, 2023
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

No branches or pull requests

1 participant