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

Fix UB in pops.c #217

Merged
merged 1 commit into from
Feb 9, 2025
Merged

Fix UB in pops.c #217

merged 1 commit into from
Feb 9, 2025

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Feb 8, 2025

It is undefined behaviour to construct a pointer that is out-of-bounds, not just to use it.

C23 standard says: If the pointer operand and the result do not point
to elements of the same array object or one past the last element of the array object,
the behavior is undefined.

It is undefined behaviour to construct a pointer that is out-of-bounds,
not just to use it.
@jvoisin jvoisin merged commit b517ae3 into daanx:master Feb 9, 2025
3 of 4 checks passed
@jvoisin
Copy link
Collaborator

jvoisin commented Feb 9, 2025

Thanks <3

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