[Openvas-commits] r5753 - in trunk/openvas-manager: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Oct 29 11:40:53 CET 2009


Author: mattm
Date: 2009-10-29 11:40:52 +0100 (Thu, 29 Oct 2009)
New Revision: 5753

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/otp.c
Log:
	* src/otp.c (process_otp_scanner_input): Add RATS comments about sscanf
	field lengths.  Put a fullstop on a comment.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2009-10-29 10:22:04 UTC (rev 5752)
+++ trunk/openvas-manager/ChangeLog	2009-10-29 10:40:52 UTC (rev 5753)
@@ -1,3 +1,8 @@
+2009-10-29  Matthew Mundell <matthew.mundell at intevation.de>
+
+	* src/otp.c (process_otp_scanner_input): Add RATS comments about sscanf
+	field lengths.  Put a fullstop on a comment.
+
 2009-10-28  Matthew Mundell <matthew.mundell at intevation.de>
 
 	* src/tasks_sql.h (config_preference): Add the config to the query.

Modified: trunk/openvas-manager/src/otp.c
===================================================================
--- trunk/openvas-manager/src/otp.c	2009-10-29 10:22:04 UTC (rev 5752)
+++ trunk/openvas-manager/src/otp.c	2009-10-29 10:40:52 UTC (rev 5753)
@@ -1582,6 +1582,7 @@
                   name = g_newa (char, strlen (field));
                   protocol = g_newa (char, strlen (field));
 
+                  /* RATS: ignore, buffers are allocated to field length. */
                   if (sscanf (field, "%s (%i/%[^)])",
                               name, &number, protocol)
                       != 3)
@@ -1655,6 +1656,7 @@
                   name = g_newa (char, strlen (field));
                   protocol = g_newa (char, strlen (field));
 
+                  /* RATS: ignore, buffers are allocated to field length. */
                   if (sscanf (field, "%s (%i/%[^)])",
                               name, &number, protocol)
                       != 3)
@@ -1725,6 +1727,7 @@
                   name = g_newa (char, strlen (field));
                   protocol = g_newa (char, strlen (field));
 
+                  /* RATS: ignore, buffers are allocated to field length. */
                   if (sscanf (field, "%s (%i/%[^)])",
                               name, &number, protocol)
                       != 3)
@@ -1795,6 +1798,7 @@
                   name = g_newa (char, strlen (field));
                   protocol = g_newa (char, strlen (field));
 
+                  /* RATS: ignore, buffers are allocated to field length. */
                   if (sscanf (field, "%s (%i/%[^)])",
                               name, &number, protocol)
                       != 3)
@@ -1865,6 +1869,7 @@
                   name = g_newa (char, strlen (field));
                   protocol = g_newa (char, strlen (field));
 
+                  /* RATS: ignore, buffers are allocated to field length. */
                   if (sscanf (field, "%s (%i/%[^)])",
                               name, &number, protocol)
                       != 3)
@@ -1994,7 +1999,7 @@
                 }
               case SCANNER_PLUGIN_LIST_DESCRIPTION:
                 {
-                  /* Un"escape" description (replace ';' by '\n') */
+                  /* Un"escape" description (replace ';' by '\n'). */
                   if (field != NULL)
                     {
                       char* pos = field;
@@ -2092,6 +2097,7 @@
                       char *name = g_malloc0 (strlen (field));
                       char *protocol = g_malloc0 (strlen (field));
 
+                      /* RATS: ignore, buffers are allocated to field length. */
                       if (sscanf (field, "%s (%i/%[^)])",
                                   name, &number, protocol)
                           != 3)



More information about the Openvas-commits mailing list