Skip to content

Validate that _Nt_checked array initializer is within size#942

Merged
mgrang merged 1 commit into
masterfrom
issue_935
Nov 17, 2020
Merged

Validate that _Nt_checked array initializer is within size#942
mgrang merged 1 commit into
masterfrom
issue_935

Conversation

@mgrang

@mgrang mgrang commented Nov 16, 2020

Copy link
Copy Markdown

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

mgrang commented Nov 16, 2020

Copy link
Copy Markdown
Author

Added unit tests in checkedc/checkedc#429

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

@sulekhark sulekhark left a comment

Copy link
Copy Markdown
Contributor

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