Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit 786442c

Browse files
author
Ikey Doherty
committed
Fix segfault when using force types
Signed-off-by: Ikey Doherty <[email protected]>
1 parent ad8011a commit 786442c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ int main(int argc, char **argv)
559559
autofree(gchar) *list = supported_packages(pkg_plugins);
560560
printf("Currently supported package types: %s\n", list);
561561
} else {
562-
package = cve_plugin_get_by_name(forced_type);
562+
pkg_plugin = package = cve_plugin_get_by_name(forced_type);
563563
if (!package) {
564564
fprintf(stderr, "Plugin \'%s\' not found.\n", forced_type);
565565
goto cleanup;
@@ -619,7 +619,7 @@ int main(int argc, char **argv)
619619
}
620620

621621
if (!forced_type) {
622-
package = plugin_for_path(pkg_plugins, target->str, false);
622+
pkg_plugin = package = plugin_for_path(pkg_plugins, target->str, false);
623623
}
624624

625625
if (modified_stamp) {

0 commit comments

Comments
 (0)