Skip to content

Fix double free in Video::~Video() - #5323

Merged
kimkulling merged 2 commits into
assimp:masterfrom
ttxine:fix-fbx-utils-double-free
Dec 1, 2023
Merged

kimkulling merged 2 commits into
assimp:masterfrom
ttxine:fix-fbx-utils-double-free

Conversation

@ttxine

@ttxine ttxine commented Nov 13, 2023

Copy link
Copy Markdown
Contributor

If contentLength is zero, then content was deallocated in Video::Video() or was not allocated at all. Thus, deleting content in destructor without a check resulted in double free.

Add a check in Video::~Video().

@kimkulling kimkulling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks fine.

@kimkulling
kimkulling merged commit d311fa9 into assimp:master Dec 1, 2023
@kimkulling

Copy link
Copy Markdown
Member

Merged, thanks a lot for your contribution.

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants