diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
commit | 21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch) | |
tree | e1810a4b135afce04b34862ef0fab2bfaeb8aeca /net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch | |
parent | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff) |
gentoo resync : 15.01.2020
Diffstat (limited to 'net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch')
-rw-r--r-- | net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch deleted file mode 100644 index 67091fcf3e3b..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- openvas-scanner-5.1.3/src/attack.c 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/attack.c 2019-02-02 00:44:12.834888067 +0300 -@@ -97,9 +97,7 @@ - }; - - /******************************************************* -- - PRIVATE FUNCTIONS -- - ********************************************************/ - - /** -@@ -996,6 +994,14 @@ - sched = plugins_scheduler_init - (prefs_get ("plugin_set"), prefs_get_bool ("auto_enable_dependencies"), - network_phase); -+ if (sched == NULL) -+ { -+ error_message_to_client (global_socket, -+ "Failed to initialize the plugins scheduler.", -+ NULL, NULL); -+ return; -+ } -+ - - max_hosts = get_max_hosts_number (); - max_checks = get_max_checks_number (); ---- openvas-scanner-5.1.3/src/pluginscheduler.c 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/pluginscheduler.c 2019-02-02 00:48:03.799598381 +0300 -@@ -486,7 +486,7 @@ - } - } - --static void -+static int - plugins_scheduler_fill (plugins_scheduler_t sched) - { - int i; -@@ -500,6 +500,15 @@ - int category; - - category = nvticache_get_category (element->data); -+ if (category < 0) -+ { -+ log_write ("The NVT with oid %s has not category assigned. This is " -+ "considered a fatal error, since the NVTI Cache " -+ "structure stored in Redis is out dated or corrupted.", -+ (char *) element->data); -+ g_slist_free_full (list, g_free); -+ return 1; -+ } - scheduler_plugin = g_malloc0 (sizeof (struct scheduler_plugin)); - scheduler_plugin->running_state = PLUGIN_STATUS_UNRUN; - scheduler_plugin->oid = g_strdup (element->data); -@@ -529,6 +538,7 @@ - } - } - -+ return 0; - } - - plugins_scheduler_t -@@ -540,7 +550,11 @@ - /* Fill our lists */ - ret = g_malloc0 (sizeof (*ret)); - ret->hash = hash_init (); -- plugins_scheduler_fill (ret); -+ if (plugins_scheduler_fill (ret)) -+ { -+ plugins_scheduler_free (ret); -+ return NULL; -+ } - - plugins_scheduler_enable (ret, plugins_list, autoload); - -@@ -729,9 +743,12 @@ - void - plugins_scheduler_free (plugins_scheduler_t sched) - { -- int i; -- hash_destroy (sched->hash); -- for (i = ACT_FIRST; i <= ACT_LAST; i++) -- list_destroy (sched->list[i]); -- g_free (sched); -+ if (sched) -+ { -+ int i; -+ hash_destroy (sched->hash); -+ for (i = ACT_FIRST; i <= ACT_LAST; i++) -+ list_destroy (sched->list[i]); -+ g_free (sched); -+ } - } |