Skip to content

Conversation

@devnexen
Copy link
Member

On successive usage, the password is copied as much but the older address is never freed. Thus, we are hinting a password reset to address it.

… leak.

On successive usage, the password is copied as much but the older
address is never freed. Thus, we are hinting a password reset to address
it.
@devnexen devnexen linked an issue Sep 23, 2025 that may be closed by this pull request
@devnexen devnexen marked this pull request as ready for review September 24, 2025 04:16
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

I wonder if this should be fixed in libzip also (i.e. whether libzip should free the old password).
Anyway, judging by https://github.com/nih-at/libzip/blob/3cd08fb38bbcbda24e9f74834c2b70b906d9069f/lib/zip_file_set_encryption.c#L41 this LGTM

@devnexen devnexen closed this in 3ee56f6 Sep 29, 2025
@remicollet
Copy link
Member

I wonder if this should be fixed in libzip also (i.e. whether libzip should free the old password). Anyway, judging by https://github.com/nih-at/libzip/blob/3cd08fb38bbcbda24e9f74834c2b70b906d9069f/lib/zip_file_set_encryption.c#L41 this LGTM

Yes, this should be fixed in libzip
So this is only a workaround
See nih-at/libzip#506

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory leak in ZipArchive->setEncryptionName()

3 participants