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

Fixed potential overflow in multiview vertex buffer validation #1855

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

m3x3
Copy link
Contributor

@m3x3 m3x3 commented Mar 9, 2022

Fixed a potential integer overflow in the "valid" path of multiview vertex buffer validation when max_instance_index equals u32::MAX. In this case, the addition max_instance_index + 1 on the right-hand side of the comparison overflows even for valid cases. The potential overflow in the error path (already marked "TODO") is not fixed by this.

I got hit by this issue when trying to run the multiview example on a Radeon 6700 XT with the amdgpu driver. The MESA driver apparently returns i32::MAX for max_instance_index and so it doesn't cause this overflow.

@Rua
Copy link
Contributor

Rua commented Mar 10, 2022

Thanks for catching this!

@Rua Rua merged commit e1558f6 into vulkano-rs:master Mar 10, 2022
Rua added a commit that referenced this pull request Mar 10, 2022
@m3x3 m3x3 deleted the multiview_overflow_fix branch November 12, 2022 13:50
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