[Openvas-commits] r5584 - in trunk/openvas-manager: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Oct 17 00:10:58 CEST 2009
Author: mattm
Date: 2009-10-17 00:10:51 +0200 (Sat, 17 Oct 2009)
New Revision: 5584
Modified:
trunk/openvas-manager/ChangeLog
trunk/openvas-manager/src/manage.c
Log:
* src/manage.c (rc_preference): Check whether there is a value to
duplicate after an equal sign.
Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog 2009-10-16 15:28:18 UTC (rev 5583)
+++ trunk/openvas-manager/ChangeLog 2009-10-16 22:10:51 UTC (rev 5584)
@@ -1,3 +1,8 @@
+2009-10-17 Matthew Mundell <matthew.mundell at intevation.de>
+
+ * src/manage.c (rc_preference): Check whether there is a value to
+ duplicate after an equal sign.
+
2009-10-16 Matthew Mundell <matthew.mundell at intevation.de>
Include report ID in OMP START_TASK response.
Modified: trunk/openvas-manager/src/manage.c
===================================================================
--- trunk/openvas-manager/src/manage.c 2009-10-16 15:28:18 UTC (rev 5583)
+++ trunk/openvas-manager/src/manage.c 2009-10-16 22:10:51 UTC (rev 5584)
@@ -352,7 +352,7 @@
#endif
#endif
-// TODO: Test these RC parsing functions.
+/** @todo Test these RC parsing functions. */
/**
* @brief Return a preference from an RC.
@@ -388,8 +388,11 @@
if (strncmp (desc, name, eq - desc - 1) == 0)
{
gchar* ret;
- ret = g_strndup (eq + 2,
- seek ? seek - (eq + 2) : strlen (seek));
+ if (seek > eq + 1)
+ ret = g_strndup (eq + 2,
+ seek ? seek - (eq + 2) : strlen (seek));
+ else
+ ret = g_strdup ("");
return ret;
}
}
More information about the Openvas-commits
mailing list