[Openvas-commits] r2627 - in trunk/openvas-client: . nessus src/gui

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Mar 2 11:11:41 CET 2009


Author: felix
Date: 2009-03-02 11:11:39 +0100 (Mon, 02 Mar 2009)
New Revision: 2627

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/nessus/auth.c
   trunk/openvas-client/src/gui/error_dlg.c
Log:
Added commented RATS ignores.

* src/gui/error_dlg.c (show_dialog_std): Added RATS ignore: Calling
getchar but not filling	any buffer.

* nessus/auth.c (auth_login): Added RATS ignore: Strlen on buffer that
is nul-terminated as it comes from network_gets.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-03-02 10:09:31 UTC (rev 2626)
+++ trunk/openvas-client/ChangeLog	2009-03-02 10:11:39 UTC (rev 2627)
@@ -1,5 +1,15 @@
 2009-03-02  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
+	Added commented RATS ignores.
+	
+	* src/gui/error_dlg.c (show_dialog_std): Added RATS ignore: Calling
+	getchar but not filling	any buffer.
+	
+	* nessus/auth.c (auth_login): Added RATS ignore: Strlen on buffer that
+	is nul-terminated as it comes from network_gets.
+	
+2009-03-02  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
 	* nessus/auth.c, nessus/prefs_dialog/prefs_plugins.c,
 	nessus/prefs_dialog/prefs_plugins_tree.c: K&R style replacements, doc,
 	minor refomatting.

Modified: trunk/openvas-client/nessus/auth.c
===================================================================
--- trunk/openvas-client/nessus/auth.c	2009-03-02 10:09:31 UTC (rev 2626)
+++ trunk/openvas-client/nessus/auth.c	2009-03-02 10:11:39 UTC (rev 2627)
@@ -57,13 +57,13 @@
 
   /* Note: even if we use SSLv3 authentication, we ask for a password anyway */
   network_gets(soc, buf, 7);
-  if(strncmp(buf, "User : ", strlen(buf)))
+  if(strncmp(buf, "User : ", strlen(buf))) /* RATS: ignore, network_gets ensures nul termination (together with recv_line) */
     return(-1);
   network_printf(soc, "%s\n", user);
 
   bzero(buf, 255);
   network_gets (soc, buf, 11);
-  if(strncmp(buf, "Password : ", strlen(buf)))
+  if(strncmp(buf, "Password : ", strlen(buf)))  /* RATS: ignore, network_gets ensures nul termination (together with recv_line) */
     return(-1);
   network_printf(soc, "%s\n", password);
   efree(&buf);

Modified: trunk/openvas-client/src/gui/error_dlg.c
===================================================================
--- trunk/openvas-client/src/gui/error_dlg.c	2009-03-02 10:09:31 UTC (rev 2626)
+++ trunk/openvas-client/src/gui/error_dlg.c	2009-03-02 10:11:39 UTC (rev 2627)
@@ -77,7 +77,7 @@
   if(wait == DIALOG_AND_WAIT)
   {
     fprintf(stderr, _("Press <Enter> to continue ...\n"));
-    getchar();
+    getchar(); /* RATS: ignore, not reading into any buffer */
   }
 }
 



More information about the Openvas-commits mailing list