Skip to content

duphandle: make dupset() not return with pointers to old alloced data#12337

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/duphandle-blob-free
Closed

duphandle: make dupset() not return with pointers to old alloced data#12337
bagder wants to merge 1 commit into
masterfrom
bagder/duphandle-blob-free

Conversation

@bagder

@bagder bagder commented Nov 16, 2023

Copy link
Copy Markdown
Member

As the blob pointers are to be duplicated, the function must not return mid-function with lingering pointers to the old handle's allocated data, as that would lead to double-free in OOM situations.

Make sure to clear all destination pointers first to avoid this risk.

Yet another duphandle flaw discovered when working on #12319

As the blob pointers are to be duplicated, the function must not return
mid-function with lingering pointers to the old handle's allocated data,
as that would lead to double-free in OOM situations.

Make sure to clear all destination pointers first to avoid this risk.
@bagder bagder closed this in 54a385e Nov 16, 2023
@bagder bagder deleted the bagder/duphandle-blob-free branch November 16, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant