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: issue related to a fix in popt v1.19 #80

Merged
merged 1 commit into from Oct 17, 2023
Merged

Fix: issue related to a fix in popt v1.19 #80

merged 1 commit into from Oct 17, 2023

Conversation

jjnicola
Copy link
Member

What

With the new popt release, a memory leak was fixed. Wmic relais into the leak to get the command line options (hostname, namespace, etc). Once the leak is fixed, the command line options are not available anymore.

This patch makes a deep copy of the options and now are available again.

Also, adds a new file with structure definition and functions to init and free the structure with the program arguments, necessary not only for wmic, but also for other libs related to wmi (wmireg, wmirsop).

Close #77
Close greenbone/openvas-scanner#1491

Jira: SC-923

Why

wmi didn't work. This patch solve it.

References

Checklist

  • Tests

With the new popt release, a memory leak was fixed.
Wmic relais into the leak to get the command line options (hostname, namespace, etc).
Once the leak is fixed, the command line options are not available anymore.

This patch makes a deep copy of the options and now are available again.

Also, adds a new file with structure definition and functions to init and
free the structure with the program arguments, necessary not only for
wmic, but also for other libs related to wmi (wmireg, wmirsop).
@jjnicola jjnicola requested a review from a team as a code owner October 12, 2023 12:57
@jjnicola jjnicola merged commit 69b4dee into main Oct 17, 2023
6 checks passed
@jjnicola jjnicola deleted the fix-cmd-args branch October 17, 2023 15:58
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.

Issue with running wmic on Debian 12/bookworm Access via WMI not possible in docker container
2 participants