greenbone / openvas-smb

SMB module for OpenVAS Scanner
GNU General Public License v2.0
47 stars 47 forks source link

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

Closed jjnicola closed 1 year ago

jjnicola commented 1 year ago

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 https://github.com/greenbone/openvas-scanner/issues/1491

Jira: SC-923

Why

wmi didn't work. This patch solve it.

References

Checklist