Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential double-free in test3.c #117

Merged
merged 1 commit into from
May 17, 2024

Conversation

dmnks
Copy link
Contributor

@dmnks dmnks commented May 16, 2024

The pointer to newargv passed to poptParseArgvString() may not be assigned to in case of an error, and it still may contain an address to already freed memory from the previous for loop iteration.

To fix, add a return value check, similar to the one above it for the out pointer.

Found by a static analyzer.

The pointer to newargv passed to poptParseArgvString() may not be
assigned to in case of an error, and it still may contain an address to
already freed memory from the previous for loop iteration.

To fix, add a return value check, similar to the one above it for the
out pointer.

Found by a static analyzer.
@pmatilai pmatilai merged commit cff3d07 into rpm-software-management:master May 17, 2024
1 check passed
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