Skip to content

Disallow casts to null-terminated pointers in checked scopes. #390

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

Closed
secure-sw-dev-bot opened this issue Jan 16, 2022 · 2 comments
Closed

Comments

@secure-sw-dev-bot
Copy link

This issue was copied from checkedc/checkedc-clang#391


We should not allow casts from unchecked, ptr, or array_ptr values to null-terminated in checked scopes. Those pointers might not pointed to a null-terminated array, or the null terminator may be overwritten.

@secure-sw-dev-bot
Copy link
Author

Comment from @dtarditi:

I believe we are already disallow implicit casts. This work item is to disallow explicit casts.

@secure-sw-dev-bot
Copy link
Author

Comment from @mgrang:

This was fixed in checkedc/checkedc-clang#626 and tests were added in checkedc/checkedc#367.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant