]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/parse.c
SECURITY: Fixed a message handling bug which could crash the daemon.
[ngircd-alex.git] / src / ngircd / parse.c
index 24de2bc818efb9a0893c4836e8ae41d8e6084a7b..493fbdc0d500336714393ea4917002c6ff5fec43 100644 (file)
@@ -338,17 +338,22 @@ Validate_Command( UNUSED CONN_ID Idx, UNUSED REQUEST *Req, bool *Closed )
 
 
 static bool
+#ifdef STRICT_RFC
 Validate_Args(CONN_ID Idx, REQUEST *Req, bool *Closed)
+#else
+Validate_Args(UNUSED CONN_ID Idx, UNUSED REQUEST *Req, bool *Closed)
+#endif
 {
 #ifdef STRICT_RFC
        int i;
 #endif
 
-       assert( Idx >= 0 );
-       assert( Req != NULL );
        *Closed = false;
 
 #ifdef STRICT_RFC
+       assert( Idx >= 0 );
+       assert( Req != NULL );
+
        /* CR and LF are never allowed in command parameters.
         * But since we do accept lines terminated only with CR or LF in
         * "non-RFC-compliant mode" (besides the correct CR+LF combination),