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

Validate that _Nt_checked array initializer is within size #942

Merged
merged 1 commit into from
Nov 17, 2020
Merged

Conversation

mgrang
Copy link

@mgrang mgrang commented Nov 16, 2020

For an _Nt_checked array the declared size should be 1 greater than the size of
the initializer to accomodate the null terminator. Due to an off-by-one error
in logic this was not being caught.

This fixes issue #935

For an _Nt_checked array the declared size should be 1 greater than the size of
the initializer to accomodate the null terminator. Due to an off-by-one error
in logic this was not being caught.

This fixes issue #935
@mgrang
Copy link
Author

mgrang commented Nov 16, 2020

Added unit tests in checkedc/checkedc#429

@mgrang mgrang linked an issue Nov 16, 2020 that may be closed by this pull request
Copy link
Contributor

@sulekhark sulekhark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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.

Inconsistency with bounds on NT arrays and NT array pointers
2 participants