[Openvas-commits] r10612 - in trunk/openvas-plugins: . scripts

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 22 09:40:08 CET 2011


Author: hdoreau
Date: 2011-03-22 09:40:03 +0100 (Tue, 22 Mar 2011)
New Revision: 10612

Modified:
   trunk/openvas-plugins/ChangeLog
   trunk/openvas-plugins/scripts/xml.inc
Log:
* scripts/xml.inc: added a NULL check to prevent a warning to be
displayed if no attributes are supplied.

* Changelog: fixed duplicate entry (from r10603) and date problem (r10611).


Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2011-03-22 07:43:18 UTC (rev 10611)
+++ trunk/openvas-plugins/ChangeLog	2011-03-22 08:40:03 UTC (rev 10612)
@@ -1,5 +1,12 @@
-2011-03-31  Chandrashekhar B <bchandra at secpod.com>
+2011-03-22  Henri Doreau <henri.doreau at greenbone.net>
 
+	* scripts/xml.inc: added a NULL check to prevent a warning to be
+	displayed if no attributes are supplied.
+
+	* Changelog: fixed duplicate entry (from r10603) and date problem (r10611).
+
+2011-03-22  Chandrashekhar B <bchandra at secpod.com>
+
 	* scripts/gb_ibm_was_mult_vuln_mar11_01.nasl,
 	scripts/gb_ibm_was_mult_vuln_mar11.nasl,
 	scripts/secpod_php_use_after_free_vuln.nasl,
@@ -1454,11 +1461,6 @@
 
 	* scripts/host_details.inc: fix naming inconsistency.
 
-2011-03-21  Henri Doreau <henri.doreau at greenbone.net>
-
-	* scripts/host_details.nasl: don't gather hardcoded values from the KB
-	now that scripts are able to register informations.
-
 2011-03-21  Michael Wiegand <michael.wiegand at greenbone.net>
 
 	* scripts/apache_conn_block.nasl: Fix include.

Modified: trunk/openvas-plugins/scripts/xml.inc
===================================================================
--- trunk/openvas-plugins/scripts/xml.inc	2011-03-22 07:43:18 UTC (rev 10611)
+++ trunk/openvas-plugins/scripts/xml.inc	2011-03-22 08:40:03 UTC (rev 10612)
@@ -29,8 +29,11 @@
     res = '';
 
     res += '<' + tag;
-    foreach attr (keys(attributes)) {
-        res += ' ' + attr + '="' + attributes[attr] + '"';
+    
+    if (!isnull(attributes)) {
+        foreach attr (keys(attributes)) {
+            res += ' ' + attr + '="' + attributes[attr] + '"';
+        }
     }
     res += '>';
 



More information about the Openvas-commits mailing list