summaryrefslogtreecommitdiff
path: root/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch
diff options
context:
space:
mode:
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.patch93
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);
-+ }
- }