Skip to content

Pre-allocate form variables before resizing#1269

Closed
LumioseSil wants to merge 1 commit intoOpenPrinting:masterfrom
LumioseSil:vars
Closed

Pre-allocate form variables before resizing#1269
LumioseSil wants to merge 1 commit intoOpenPrinting:masterfrom
LumioseSil:vars

Conversation

@LumioseSil
Copy link
Copy Markdown
Contributor

If the calloc fails, this is catastrophic. We cannot trust form_vars as the memory block could have changed entirely. Who knows what issues this can cause. This is undefined behavior.

If the calloc fails, this is catastrophic. We cannot trust form_vars as the memory block could have changed entirely. Who knows what issues this can cause. This is undefined behavior.
Copy link
Copy Markdown
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

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

If the realloc fails the original memory block is unchanged. And the existing code doesn't allocate one element at a time, either.

@michaelrsweet michaelrsweet self-assigned this May 17, 2025
@michaelrsweet michaelrsweet added the wontfix This will not be worked on label May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants