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

Change InputBuffer::m_sizeInBytes default to UINT32_MAX #76

Merged

Conversation

vdwtanner
Copy link
Collaborator

m_sizeInBytes is only used for bounds checking, but we don't always have a valid size to go off of, particularly for user memory buffers.

When possible, we will take advantage of it for the bounds check, but if it isn't available we should default to trusting the app to pass valid data. UINT32_MAX will always be greater than the attempted upload size, so this is a safe default in this case.

m_sizeInBytes is only used for bounds checking, but we don't always
have a valid size to go off of, particularly for user memory buffers.

When possible, we will take advantage of it for the bounds check, but if
it isn't available we should default to trusting the app to pass valid
data. UINT32_MAX will always be greater than the attempted upload size,
so this is a safe default in this case.
@vdwtanner vdwtanner merged commit f060ab0 into main Dec 11, 2023
2 checks passed
@vdwtanner vdwtanner deleted the user/tvandewalle/fixSizeCheckToAccountForIndexBuffers branch December 11, 2023 18:18
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