Skip to content

Conversation

@AZero13
Copy link
Contributor

@AZero13 AZero13 commented Mar 7, 2025

Ensure buffer is the right size.

Ensure correct alignment and no UB

Ensure buffer is the right size.

Ensure correct alignment and no UB
@millert
Copy link
Collaborator

millert commented Mar 7, 2025

Those alignment changes don't seem necessary; there are alignment issues using a char array as a int type but not going the other way. Also, the reallocarray() function checks for overflow itself so there is no need to do it manually in the caller.

@AZero13 AZero13 closed this Mar 7, 2025
@AZero13 AZero13 deleted the UB branch March 7, 2025 14:22
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